After using glob(), the glob_t should be freed using globfree()
After using xmlReadFile(), the return value shoud be freed using xmlFreeDoc()
Change-Id: I84a514e0849eb85ccf23834770c39d3d3220f635
Signed-off-by: Ilho Kim <ilho159.kim@samsung.com>
for (unsigned int i = 0; i < glob_result.gl_pathc; ++i) {
xmlFiles.insert(glob_result.gl_pathv[i]);
}
+ globfree(&glob_result);
}
GList* privileges = nullptr;
BOOST_SCOPE_EXIT_ALL(privileges) {
std::unique_ptr<parser::DictionaryValue> result(new parser::DictionaryValue);
if (dv)
result->Set(reinterpret_cast<const char*>(root_node->name), dv.release());
+ xmlFreeDoc(doc);
return result;
}