mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-09-22 04:15:54 -04:00
guard for 2 NULL pointer cases raised by coverity. Neither should occur in practice
svn path=/icecast/trunk/icecast/; revision=15358
This commit is contained in:
parent
7b9b682a94
commit
d503f0bf5c
@ -93,8 +93,7 @@ static void queue_auth_client (auth_client *auth_user, mount_proxy *mountinfo)
|
||||
{
|
||||
auth_t *auth;
|
||||
|
||||
if (auth_user == NULL || (mountinfo == NULL && auth_user->client
|
||||
&& auth_user->client->auth == NULL))
|
||||
if (auth_user == NULL)
|
||||
return;
|
||||
auth_user->next = NULL;
|
||||
if (mountinfo)
|
||||
@ -107,6 +106,11 @@ static void queue_auth_client (auth_client *auth_user, mount_proxy *mountinfo)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (auth_user->client == NULL || auth_user->client->auth == NULL)
|
||||
{
|
||||
WARN1 ("internal state is incorrect for %p", auth_user->client);
|
||||
return;
|
||||
}
|
||||
auth = auth_user->client->auth;
|
||||
thread_mutex_lock (&auth->lock);
|
||||
}
|
||||
|
@ -111,6 +111,8 @@ static void htpasswd_recheckfile (htpasswd_auth_state *htpasswd)
|
||||
char *sep;
|
||||
char line [MAX_LINE_LEN];
|
||||
|
||||
if (htpasswd->filename == NULL)
|
||||
return;
|
||||
if (stat (htpasswd->filename, &file_stat) < 0)
|
||||
{
|
||||
WARN1 ("failed to check status of %s", htpasswd->filename);
|
||||
|
Loading…
Reference in New Issue
Block a user