Skip to content
Snippets Groups Projects
Commit a7f5ea5b authored by Julien Osman's avatar Julien Osman
Browse files

BUG: Avoid a memory leak

parent c0ca2017
No related branches found
No related tags found
No related merge requests found
......@@ -64,7 +64,10 @@ const std::string XMLMetadataSupplier::GetFirstMetadataValue(const std::string p
// Look for the next joker
found = path.find("_#", start);
// Look for the keys corresponding to the part of the path between the two jokers
values = this->CSLFetchPartialNameValueMultiple(values, path.substr(start, found).c_str());
char ** new_values = this->CSLFetchPartialNameValueMultiple(values, path.substr(start, found).c_str());
CSLDestroy(values);
values = CSLDuplicate(new_values);
CSLDestroy(new_values);
start = found + 2;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment