log: fix double free() bug during shutdown
Don't free an internal configuration value in log_init(). Call config_get_path() instead of manually calling parsePath().
This commit is contained in:
parent
15d4c841ce
commit
badb827712
1
NEWS
1
NEWS
|
@ -2,6 +2,7 @@ ver 0.15.1 (2009/??/??)
|
||||||
* commands:
|
* commands:
|
||||||
- don't resume playback when stopping during pause
|
- don't resume playback when stopping during pause
|
||||||
* database: fixed NULL pointer dereference after charset change
|
* database: fixed NULL pointer dereference after charset change
|
||||||
|
* log: fix double free() bug during shutdown
|
||||||
|
|
||||||
|
|
||||||
ver 0.15 (2009/06/23)
|
ver 0.15 (2009/06/23)
|
||||||
|
|
|
@ -259,12 +259,8 @@ void log_init(bool verbose, bool use_stdout)
|
||||||
log_init_syslog();
|
log_init_syslog();
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
char *path = parsePath(param->value);
|
const char *path = config_get_path(CONF_LOG_FILE);
|
||||||
g_free(param->value);
|
assert(path != NULL);
|
||||||
|
|
||||||
if (path == NULL)
|
|
||||||
g_error("error parsing \"%s\" at line %i\n",
|
|
||||||
CONF_LOG_FILE, param->line);
|
|
||||||
|
|
||||||
log_init_file(path, param->line);
|
log_init_file(path, param->line);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue