ConfigData: add constructors/destructors

This commit is contained in:
Max Kellermann
2013-01-30 22:00:32 +01:00
parent 2d63c26936
commit d9ea3082fb
8 changed files with 33 additions and 57 deletions

View File

@@ -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)