Commit 22654d27 authored by Karl Heyes's avatar Karl Heyes

Handle missing mount in relay case, and add checks for NULL which may be an issue for libxml2.

svn path=/icecast/trunk/icecast/; revision=14430
parent 4aa2f1e0
...@@ -119,30 +119,30 @@ static void config_clear_mount (mount_proxy *mount) ...@@ -119,30 +119,30 @@ static void config_clear_mount (mount_proxy *mount)
{ {
config_options_t *option; config_options_t *option;
xmlFree (mount->mountname); if (mount->mountname) xmlFree (mount->mountname);
xmlFree (mount->username); if (mount->username) xmlFree (mount->username);
xmlFree (mount->password); if (mount->password) xmlFree (mount->password);
xmlFree (mount->dumpfile); if (mount->dumpfile) xmlFree (mount->dumpfile);
xmlFree (mount->intro_filename); if (mount->intro_filename) xmlFree (mount->intro_filename);
xmlFree (mount->on_connect); if (mount->on_connect) xmlFree (mount->on_connect);
xmlFree (mount->on_disconnect); if (mount->on_disconnect) xmlFree (mount->on_disconnect);
xmlFree (mount->fallback_mount); if (mount->fallback_mount) xmlFree (mount->fallback_mount);
xmlFree (mount->stream_name); if (mount->stream_name) xmlFree (mount->stream_name);
xmlFree (mount->stream_description); if (mount->stream_description) xmlFree (mount->stream_description);
xmlFree (mount->stream_url); if (mount->stream_url) xmlFree (mount->stream_url);
xmlFree (mount->stream_genre); if (mount->stream_genre) xmlFree (mount->stream_genre);
xmlFree (mount->bitrate); if (mount->bitrate) xmlFree (mount->bitrate);
xmlFree (mount->type); if (mount->type) xmlFree (mount->type);
xmlFree (mount->charset); if (mount->charset) xmlFree (mount->charset);
xmlFree (mount->cluster_password); if (mount->cluster_password) xmlFree (mount->cluster_password);
xmlFree (mount->auth_type); if (mount->auth_type) xmlFree (mount->auth_type);
option = mount->auth_options; option = mount->auth_options;
while (option) while (option)
{ {
config_options_t *nextopt = option->next; config_options_t *nextopt = option->next;
xmlFree (option->name); if (option->name) xmlFree (option->name);
xmlFree (option->value); if (option->value) xmlFree (option->value);
free (option); free (option);
option = nextopt; option = nextopt;
} }
...@@ -729,6 +729,7 @@ static void _parse_relay(xmlDocPtr doc, xmlNodePtr node, ...@@ -729,6 +729,7 @@ static void _parse_relay(xmlDocPtr doc, xmlNodePtr node,
relay->next = NULL; relay->next = NULL;
relay->mp3metadata = 1; relay->mp3metadata = 1;
relay->on_demand = configuration->on_demand; relay->on_demand = configuration->on_demand;
relay->mount = (char *)xmlCharStrdup ("/");
do { do {
if (node == NULL) break; if (node == NULL) break;
......
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