Commit ebf6603c authored by Karl Heyes's avatar Karl Heyes

small YP memory cleanup

svn path=/trunk/icecast/; revision=5842
parent 66082000
......@@ -147,7 +147,7 @@ void config_clear(ice_config_t *c)
xmlFree(c->webroot_dir);
if (c->adminroot_dir && c->adminroot_dir != CONFIG_DEFAULT_ADMINROOT_DIR)
xmlFree(c->adminroot_dir);
if (c->pidfile)
if (c->pidfile)
xmlFree(c->pidfile);
if (c->access_log && c->access_log != CONFIG_DEFAULT_ACCESS_LOG)
xmlFree(c->access_log);
......@@ -215,6 +215,14 @@ void config_clear(ice_config_t *c)
free(dirnode);
dirnode = nextdirnode;
}
#ifdef HAVE_YP
i = 0;
while (i < c->num_yp_directories)
{
xmlFree (c->yp_url[i]);
i++;
}
#endif
memset(c, 0, sizeof(ice_config_t));
}
......
......@@ -219,8 +219,10 @@ int source_free_source(void *key)
avl_tree_free(source->client_tree, _free_client);
source->format->free_plugin(source->format);
#ifdef USE_YP
for (i=0; i<source->num_yp_directories; i++) {
for (i=0; i<source->num_yp_directories; i++)
{
yp_destroy_ypdata(source->ypdata[i]);
source->ypdata[i] = NULL;
}
#endif
util_dict_free(source->audio_info);
......
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