Skip to content

Commit 8b9f91d

Browse files
committed
Free allocated memory during analysis merges.
1 parent 282d2e5 commit 8b9f91d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

filemetadata.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,16 +269,15 @@ MergeResult FileMetadata::MergeUserAnalysis(const std::string& name, const std::
269269
size_t numHashes = excludedHashes.size();
270270
char** tempList = new char*[numHashes];
271271
for (size_t i = 0; i < numHashes; i++)
272-
{
273272
tempList[i] = BNAllocString(excludedHashes[i].c_str());
274-
}
275273

276274
DatabaseProgressCallbackContext cb;
277275
cb.func = progress;
278276

279277
BNMergeResult bnResult = BNMergeUserAnalysis(m_object, name.c_str(), &cb, DatabaseProgressCallback, tempList, numHashes);
280-
//BNFreeStringList(hashList, numHashes);
281278
MergeResult result(bnResult);
279+
280+
BNFreeStringList(tempList, numHashes);
282281
return result;
283282
}
284283

0 commit comments

Comments
 (0)