diff options
| author | Peter LaFosse <peter@vector35.com> | 2018-12-19 10:44:45 -0500 |
|---|---|---|
| committer | Peter LaFosse <peter@vector35.com> | 2018-12-19 10:44:45 -0500 |
| commit | f93fc67f3f18488882293e08b7ba76b1c7781cbf (patch) | |
| tree | 48d3bc7e5c150877737cb86876c65d9dcab554f6 /architecture.cpp | |
| parent | 10a89e67ab3f3129570382f3fa4c500e77d8dab6 (diff) | |
Don't free InstructionTextTokens in the core if they were alloced in the API
Diffstat (limited to 'architecture.cpp')
| -rw-r--r-- | architecture.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/architecture.cpp b/architecture.cpp index ea32a09e..da0366cf 100644 --- a/architecture.cpp +++ b/architecture.cpp @@ -227,7 +227,9 @@ bool Architecture::GetInstructionTextCallback(void* ctxt, const uint8_t* data, u void Architecture::FreeInstructionTextCallback(BNInstructionTextToken* tokens, size_t count) { - BNFreeInstructionText(tokens, count); + for (size_t i = 0; i < count; i++) + BNFreeString(tokens[i].text); + delete[] tokens; } |
