summaryrefslogtreecommitdiff
path: root/architecture.cpp
diff options
context:
space:
mode:
authorPeter LaFosse <peter@vector35.com>2018-12-19 10:44:45 -0500
committerPeter LaFosse <peter@vector35.com>2018-12-19 10:44:45 -0500
commitf93fc67f3f18488882293e08b7ba76b1c7781cbf (patch)
tree48d3bc7e5c150877737cb86876c65d9dcab554f6 /architecture.cpp
parent10a89e67ab3f3129570382f3fa4c500e77d8dab6 (diff)
Don't free InstructionTextTokens in the core if they were alloced in the API
Diffstat (limited to 'architecture.cpp')
-rw-r--r--architecture.cpp4
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;
}