diff options
Diffstat (limited to 'src/Main.cxx')
-rw-r--r-- | src/Main.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Main.cxx b/src/Main.cxx index 63a78d0e4..613a253b2 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -189,7 +189,7 @@ glue_db_init_and_load(void) struct config_param *allocated = NULL; if (param == NULL && path != NULL) { - allocated = config_new_param("database", path->line); + allocated = new config_param("database", path->line); config_add_block_param(allocated, "path", path->value, path->line); param = allocated; @@ -198,8 +198,7 @@ glue_db_init_and_load(void) if (!DatabaseGlobalInit(param, &error)) MPD_ERROR("%s", error->message); - if (allocated != NULL) - config_param_free(allocated); + delete allocated; ret = DatabaseGlobalOpen(&error); if (!ret) |