mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
prevent NULL dereference
svn path=/icecast/trunk/icecast/; revision=14307
This commit is contained in:
parent
02cc6c5f10
commit
73401b80d5
@ -417,14 +417,15 @@ static int add_authenticated_listener (const char *mount, mount_proxy *mountinfo
|
|||||||
source = source_find_mount (mount);
|
source = source_find_mount (mount);
|
||||||
|
|
||||||
if (source)
|
if (source)
|
||||||
|
{
|
||||||
|
if (mountinfo)
|
||||||
{
|
{
|
||||||
if (check_duplicate_logins (source, client, mountinfo->auth) == 0)
|
if (check_duplicate_logins (source, client, mountinfo->auth) == 0)
|
||||||
{
|
{
|
||||||
avl_tree_unlock (global.source_tree);
|
avl_tree_unlock (global.source_tree);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (mountinfo)
|
|
||||||
{
|
|
||||||
/* set a per-mount disconnect time if auth hasn't set one already */
|
/* set a per-mount disconnect time if auth hasn't set one already */
|
||||||
if (mountinfo->max_listener_duration && client->con->discon_time == 0)
|
if (mountinfo->max_listener_duration && client->con->discon_time == 0)
|
||||||
client->con->discon_time = time(NULL) + mountinfo->max_listener_duration;
|
client->con->discon_time = time(NULL) + mountinfo->max_listener_duration;
|
||||||
|
Loading…
Reference in New Issue
Block a user