aboutsummaryrefslogtreecommitdiff
path: root/src/Main.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-30 22:00:32 +0100
committerMax Kellermann <max@duempel.org>2013-01-30 22:20:14 +0100
commitd9ea3082fb608935c72620e272f4b3e74b2c3a44 (patch)
tree5353513725721f49c0296520b0f55f760dacf8a5 /src/Main.cxx
parent2d63c26936b2b9acfb8f2f81a109e4aff0b26fe7 (diff)
ConfigData: add constructors/destructors
Diffstat (limited to 'src/Main.cxx')
-rw-r--r--src/Main.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Main.cxx b/src/Main.cxx
index 63a78d0e..613a253b 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)