Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit ec0e0ee4 authored by Rob Swindell's avatar Rob Swindell 💬

Fix a couple of resource leaks in iniSortSections()

One in an error path (CID 331353), the other not.
parent 97650f46
Pipeline #2119 passed with stage
in 12 minutes and 1 second
...@@ -462,6 +462,7 @@ BOOL iniSortSections(str_list_t* list, BOOL sort_keys) ...@@ -462,6 +462,7 @@ BOOL iniSortSections(str_list_t* list, BOOL sort_keys)
new_list = strListInit(); new_list = strListInit();
if(new_list == NULL) { if(new_list == NULL) {
strListFree(&section_list); strListFree(&section_list);
strListFree(&root_keys);
return FALSE; return FALSE;
} }
strListAppendList(&new_list, root_keys); strListAppendList(&new_list, root_keys);
...@@ -473,6 +474,7 @@ BOOL iniSortSections(str_list_t* list, BOOL sort_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); iniAppendSectionWithKeys(&new_list, section_list[i], keys, /* ini_style_t */NULL);
strListFree(&keys); strListFree(&keys);
} }
strListFree(&section_list);
strListFree(list); strListFree(list);
*list = new_list; *list = new_list;
return TRUE; return TRUE;
......
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