From d9ea3082fb608935c72620e272f4b3e74b2c3a44 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 30 Jan 2013 22:00:32 +0100 Subject: ConfigData: add constructors/destructors --- src/Main.cxx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Main.cxx') 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) -- cgit v1.2.3