From 66082000b4cac54f693db90d171420fe1a2a7485 Mon Sep 17 00:00:00 2001 From: Karl Heyes Date: Tue, 17 Feb 2004 15:46:05 +0000 Subject: [PATCH] minor cleanup svn path=/trunk/icecast/; revision=5834 --- src/cfgfile.c | 6 ++++-- src/source.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/cfgfile.c b/src/cfgfile.c index 1553ac1f..f651809f 100644 --- a/src/cfgfile.c +++ b/src/cfgfile.c @@ -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) { diff --git a/src/source.c b/src/source.c index dc377613..eae97cab 100644 --- a/src/source.c +++ b/src/source.c @@ -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)