Skip to content
Snippets Groups Projects
Commit ec0e0ee4 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix a couple of resource leaks in iniSortSections()

One in an error path (CID 331353), the other not.
parent 97650f46
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2119 passed
......@@ -462,6 +462,7 @@ BOOL iniSortSections(str_list_t* list, BOOL sort_keys)
new_list = strListInit();
if(new_list == NULL) {
strListFree(&section_list);
strListFree(&root_keys);
return FALSE;
}
strListAppendList(&new_list, root_keys);
......@@ -473,6 +474,7 @@ BOOL iniSortSections(str_list_t* list, BOOL sort_keys)
iniAppendSectionWithKeys(&new_list, section_list[i], keys, /* ini_style_t */NULL);
strListFree(&keys);
}
strListFree(&section_list);
strListFree(list);
*list = new_list;
return TRUE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment