1
0
mirror of https://gitlab.xiph.org/xiph/icecast-server.git synced 2024-09-22 04:15:54 -04:00

minor cleanup

svn path=/trunk/icecast/; revision=5834
This commit is contained in:
Karl Heyes 2004-02-17 15:46:05 +00:00
parent c3f0d43821
commit 66082000b4
2 changed files with 5 additions and 3 deletions

View File

@ -167,8 +167,7 @@ void config_clear(ice_config_t *c)
nextrelay = relay->next;
xmlFree(relay->server);
xmlFree(relay->mount);
if(relay->localmount)
xmlFree(relay->localmount);
xmlFree(relay->localmount);
free(relay);
relay = nextrelay;
}
@ -600,6 +599,8 @@ static void _parse_relay(xmlDocPtr doc, xmlNodePtr node,
if(tmp) xmlFree(tmp);
}
} while ((node = node->next));
if (relay->localmount == NULL)
relay->localmount = xmlStrdup (relay->mount);
}
static void _parse_listen_socket(xmlDocPtr doc, xmlNodePtr node,
@ -701,6 +702,7 @@ static void _parse_directory(xmlDocPtr doc, xmlNodePtr node,
tmp = (char *)xmlNodeListGetString(doc, node->xmlChildrenNode, 1);
configuration->yp_url_timeout[configuration->num_yp_directories] =
atoi(tmp);
if (tmp) xmlFree(tmp);
} else if (strcmp(node->name, "server") == 0) {
_add_server(doc, node->xmlChildrenNode, configuration);
} else if (strcmp(node->name, "touch-interval") == 0) {

View File

@ -147,7 +147,7 @@ source_t *source_find_mount_raw(const char *mount)
/* Search for mount, if the mount is there but not currently running then
* check it's fallback, and so on. Must have a global source lock to call
* check the fallback, and so on. Must have a global source lock to call
* this function.
*/
source_t *source_find_mount (const char *mount)