Commit d503f0bf authored by Karl Heyes's avatar Karl Heyes

guard for 2 NULL pointer cases raised by coverity. Neither should occur in practice

svn path=/icecast/trunk/icecast/; revision=15358
parent 7b9b682a
......@@ -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);
......
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