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

Free the supported_archive_formats str_list in the right function

parent 646747c4
No related branches found
No related tags found
No related merge requests found
...@@ -73,7 +73,6 @@ bool read_file_cfg(scfg_t* cfg, char* error, size_t maxerrlen) ...@@ -73,7 +73,6 @@ bool read_file_cfg(scfg_t* cfg, char* error, size_t maxerrlen)
cfg->file_misc = iniGetInt32(ini, ROOT_SECTION, "settings", 0); cfg->file_misc = iniGetInt32(ini, ROOT_SECTION, "settings", 0);
cfg->filename_maxlen = iniGetIntInRange(ini, ROOT_SECTION, "filename_maxlen", 8, SMB_FILEIDX_NAMELEN, UINT16_MAX); cfg->filename_maxlen = iniGetIntInRange(ini, ROOT_SECTION, "filename_maxlen", 8, SMB_FILEIDX_NAMELEN, UINT16_MAX);
SAFECOPY(str, iniGetString(ini, ROOT_SECTION, "supported_archive_formats", "zip,z7,tgz", value)); SAFECOPY(str, iniGetString(ini, ROOT_SECTION, "supported_archive_formats", "zip,z7,tgz", value));
strListFree(&cfg->supported_archive_formats);
cfg->supported_archive_formats = strListSplit(NULL, str, " ,"); cfg->supported_archive_formats = strListSplit(NULL, str, " ,");
named_str_list_t** sections = iniParseSections(ini); named_str_list_t** sections = iniParseSections(ini);
...@@ -872,6 +871,7 @@ void free_file_cfg(scfg_t* cfg) ...@@ -872,6 +871,7 @@ void free_file_cfg(scfg_t* cfg)
{ {
int i; int i;
strListFree(&cfg->supported_archive_formats);
if (cfg->fextr != NULL) { if (cfg->fextr != NULL) {
for (i = 0; i < cfg->total_fextrs; i++) { for (i = 0; i < cfg->total_fextrs; i++) {
FREE_AND_NULL(cfg->fextr[i]); FREE_AND_NULL(cfg->fextr[i]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment