Commit 01a45a53 authored by Denis Krjuchkov's avatar Denis Krjuchkov Committed by Max Kellermann

cmdline: bunch of fixes related to config file selection

- fix potential memory leak of system_path 'Potential' because currently g_get_system_config_dirs() returns single entry on Windows, but that might change. - remove incorrect g_free() call It's not required at all because g_get_system_config_dirs() returns GLib owned memory. - remove extra semicolon
parent a9a5907a
......@@ -213,12 +213,12 @@ parse_cmdline(int argc, char **argv, struct options *options,
if(g_file_test(system_path,
G_FILE_TEST_IS_REGULAR)) {
ret = config_read_file(system_path,error_r);
g_free(system_path);
break;
}
++i;;
} else
g_free(system_path);
++i;
}
g_free(system_path);
g_free(&system_config_dirs);
}
#else /* G_OS_WIN32 */
char *path2;
......
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