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
This commit is contained in:
parent
a9a5907a0f
commit
01a45a53aa
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user