diff options
| author | Brian Potchik <brian@vector35.com> | 2022-01-27 20:50:48 -0500 |
|---|---|---|
| committer | Brian Potchik <brian@vector35.com> | 2022-01-27 20:50:48 -0500 |
| commit | 8b9f91d392f41bd44c3345205bce66a6626136d0 (patch) | |
| tree | 791f98c0e571799b0dcb9bff107d4d9d34332777 /filemetadata.cpp | |
| parent | 282d2e550ad0f379df20895026173c9222412937 (diff) | |
Free allocated memory during analysis merges.
Diffstat (limited to 'filemetadata.cpp')
| -rw-r--r-- | filemetadata.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/filemetadata.cpp b/filemetadata.cpp index 540151c7..17de62ef 100644 --- a/filemetadata.cpp +++ b/filemetadata.cpp @@ -269,16 +269,15 @@ MergeResult FileMetadata::MergeUserAnalysis(const std::string& name, const std:: size_t numHashes = excludedHashes.size(); char** tempList = new char*[numHashes]; for (size_t i = 0; i < numHashes; i++) - { tempList[i] = BNAllocString(excludedHashes[i].c_str()); - } DatabaseProgressCallbackContext cb; cb.func = progress; BNMergeResult bnResult = BNMergeUserAnalysis(m_object, name.c_str(), &cb, DatabaseProgressCallback, tempList, numHashes); - //BNFreeStringList(hashList, numHashes); MergeResult result(bnResult); + + BNFreeStringList(tempList, numHashes); return result; } |
