summaryrefslogtreecommitdiff
path: root/debuginfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'debuginfo.cpp')
-rw-r--r--debuginfo.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/debuginfo.cpp b/debuginfo.cpp
index ce8ab495..68eeba70 100644
--- a/debuginfo.cpp
+++ b/debuginfo.cpp
@@ -291,7 +291,9 @@ bool DebugInfo::AddType(const string& name, Ref<Type> type, const vector<string>
const char** const componentArray = new const char*[components.size()];
for (size_t i = 0; i < components.size(); ++i)
componentArray[i] = components[i].c_str();
- return BNAddDebugType(m_object, name.c_str(), type->GetObject(), componentArray, components.size());
+ bool result = BNAddDebugType(m_object, name.c_str(), type->GetObject(), componentArray, components.size());
+ delete[] componentArray;
+ return result;
}