diff options
| author | Glenn Smith <glenn@vector35.com> | 2023-11-14 18:35:38 -0500 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2023-11-14 18:35:38 -0500 |
| commit | 4025361513068463390900635313910200542556 (patch) | |
| tree | 2dbfc8ef20c3eae8d849a02d833917dc24b28d28 /binaryninjaapi.h | |
| parent | 814d840c8d12dfcfb60a5bf172ea494825fd30c1 (diff) | |
Fix a number of leaks and bad uses of free in the api
See https://github.com/Vector35/binaryninja-api/issues/4751
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index 32db3582..0052e3ed 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -3625,6 +3625,7 @@ namespace BinaryNinja { static BNTag** CreateTagList(const std::vector<Ref<Tag>>& tags, size_t* count); static std::vector<Ref<Tag>> ConvertTagList(BNTag** tags, size_t count); + static void FreeTagList(BNTag** tags, size_t count); static std::vector<Ref<Tag>> ConvertAndFreeTagList(BNTag** tags, size_t count); }; @@ -3655,6 +3656,7 @@ namespace BinaryNinja { static BNTagReference* CreateTagReferenceList(const std::vector<TagReference>& tags, size_t* count); static std::vector<TagReference> ConvertTagReferenceList(BNTagReference* tags, size_t count); + static void FreeTagReferenceList(BNTagReference* tags, size_t count); static std::vector<TagReference> ConvertAndFreeTagReferenceList(BNTagReference* tags, size_t count); }; @@ -9470,6 +9472,7 @@ namespace BinaryNinja { static PossibleValueSet FromAPIObject(BNPossibleValueSet& value); BNPossibleValueSet ToAPIObject(); + static void FreeAPIObject(BNPossibleValueSet* value); }; class FlowGraph; @@ -15255,6 +15258,7 @@ namespace BinaryNinja { BNType* type, const BNInstructionTextToken* prefix, size_t prefixCount, size_t width, size_t* count, BNTypeContext* typeCxt, size_t ctxCount); static void FreeCallback(void* ctxt); + static void FreeLinesCallback(void* ctxt, BNDisassemblyTextLine* lines, size_t count); public: DataRenderer(); |
