diff options
author | Max Kellermann <max@duempel.org> | 2009-07-05 07:14:24 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-07-05 07:14:24 +0200 |
commit | badb827712f14a811483ed542b2c2cf09e650cce (patch) | |
tree | fb1b2f6a9ffb583fe6856e26fd14a5542a8ed318 /src/log.c | |
parent | 15d4c841ce8b5b387850d710999c623b038910fa (diff) | |
download | mpd-badb827712f14a811483ed542b2c2cf09e650cce.tar.gz mpd-badb827712f14a811483ed542b2c2cf09e650cce.tar.xz mpd-badb827712f14a811483ed542b2c2cf09e650cce.zip |
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().
Diffstat (limited to 'src/log.c')
-rw-r--r-- | src/log.c | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -259,12 +259,8 @@ void log_init(bool verbose, bool use_stdout) log_init_syslog(); #endif } else { - char *path = parsePath(param->value); - g_free(param->value); - - if (path == NULL) - g_error("error parsing \"%s\" at line %i\n", - CONF_LOG_FILE, param->line); + const char *path = config_get_path(CONF_LOG_FILE); + assert(path != NULL); log_init_file(path, param->line); } |