summaryrefslogtreecommitdiff
path: root/platform.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform.cpp')
-rw-r--r--platform.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/platform.cpp b/platform.cpp
index 070c6d94..1a94b34d 100644
--- a/platform.cpp
+++ b/platform.cpp
@@ -430,6 +430,7 @@ bool Platform::ParseTypesFromSource(const string& source, const string& fileName
&errorStr, includeDirList, includeDirs.size(), autoTypeSource.c_str());
errors = errorStr;
BNFreeString(errorStr);
+ delete[] includeDirList;
if (!ok)
return false;
@@ -441,14 +442,13 @@ bool Platform::ParseTypesFromSource(const string& source, const string& fileName
for (size_t i = 0; i < result.variableCount; i++)
{
QualifiedName name = QualifiedName::FromAPIObject(&result.variables[i].name);
- types[name] = new Type(BNNewTypeReference(result.variables[i].type));
+ variables[name] = new Type(BNNewTypeReference(result.variables[i].type));
}
for (size_t i = 0; i < result.functionCount; i++)
{
QualifiedName name = QualifiedName::FromAPIObject(&result.functions[i].name);
- types[name] = new Type(BNNewTypeReference(result.functions[i].type));
+ functions[name] = new Type(BNNewTypeReference(result.functions[i].type));
}
- delete[] includeDirList;
BNFreeTypeParserResult(&result);
return true;
}
@@ -473,6 +473,7 @@ bool Platform::ParseTypesFromSourceFile(const string& fileName, map<QualifiedNam
includeDirList, includeDirs.size(), autoTypeSource.c_str());
errors = errorStr;
BNFreeString(errorStr);
+ delete[] includeDirList;
if (!ok)
return false;