diff --git a/src/auth.c b/src/auth.c index fc02a90c..e5b065c5 100644 --- a/src/auth.c +++ b/src/auth.c @@ -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); } diff --git a/src/auth_htpasswd.c b/src/auth_htpasswd.c index 458a4e2e..170b2be0 100644 --- a/src/auth_htpasswd.c +++ b/src/auth_htpasswd.c @@ -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);