Commit 98a6f4ef authored by Michael Smith's avatar Michael Smith

Free new config variables on shutdown (forgot to add this before)

svn path=/trunk/icecast/; revision=4330
parent 037789bc
......@@ -69,6 +69,7 @@ void config_shutdown(void)
{
ice_config_dir_t *dirnode, *nextdirnode;
ice_config_t *c = &_configuration;
relay_server *relay, *nextrelay;
if (_config_filename) free(_config_filename);
......@@ -80,6 +81,10 @@ void config_shutdown(void)
xmlFree(c->source_password);
if (c->relay_password && c->relay_password != CONFIG_DEFAULT_SOURCE_PASSWORD)
xmlFree(c->relay_password);
if (c->admin_username)
xmlFree(c->admin_username);
if (c->admin_password)
xmlFree(c->admin_password);
if (c->hostname && c->hostname != CONFIG_DEFAULT_HOSTNAME)
xmlFree(c->hostname);
if (c->base_dir && c->base_dir != CONFIG_DEFAULT_BASE_DIR)
......@@ -97,6 +102,14 @@ void config_shutdown(void)
if (c->master_password) xmlFree(c->master_password);
if (c->user) xmlFree(c->user);
if (c->group) xmlFree(c->group);
relay = _configuration.relay;
while(relay) {
nextrelay = relay->next;
xmlFree(relay->server);
xmlFree(relay->mount);
free(relay);
relay = nextrelay;
}
dirnode = _configuration.dir_list;
while(dirnode) {
nextdirnode = dirnode->next;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment