mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Fix segfault if current source didn't exist on fallback mount request.
svn path=/trunk/icecast/; revision=4292
This commit is contained in:
parent
ac6bd1d2e7
commit
6f1f4072af
@ -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");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
old = source->fallback_mount;
|
old = source->fallback_mount;
|
||||||
source->fallback_mount = strdup(value);
|
source->fallback_mount = strdup(value);
|
||||||
free(old);
|
free(old);
|
||||||
|
Loading…
Reference in New Issue
Block a user