Commit a7f5ea5b authored by Julien Osman's avatar Julien Osman

BUG: Avoid a memory leak

parent c0ca2017
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment