Commit 6f1f4072 authored by Michael Smith's avatar Michael Smith

Fix segfault if current source didn't exist on fallback mount request.

svn path=/trunk/icecast/; revision=4292
parent ac6bd1d2
...@@ -443,6 +443,11 @@ static void handle_fallback_request(client_t *client) ...@@ -443,6 +443,11 @@ static void handle_fallback_request(client_t *client)
source = source_find_mount(mount); source = source_find_mount(mount);
avl_tree_unlock(global.source_tree); avl_tree_unlock(global.source_tree);
if(source == NULL) {
client_send_400(client, "Current source not found");
old = source->fallback_mount; old = source->fallback_mount;
source->fallback_mount = strdup(value); source->fallback_mount = strdup(value);
free(old); free(old);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment