]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
http: coverity - fix hc_access assignment when freed
authorJaroslav Kysela <perex@perex.cz>
Mon, 23 May 2016 18:44:17 +0000 (20:44 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 23 May 2016 18:44:21 +0000 (20:44 +0200)
src/http.c

index d98a06faec085f4694cdbf4d719f2e4f4e97e215..6a0ecabe3fbece481953f2528bfed60e01e78cba 100644 (file)
@@ -844,8 +844,10 @@ http_access_verify(http_connection_t *hc, int mask)
 
   if (res) {
     access_destroy(hc->hc_access);
-    if (http_verify_prepare(hc, &v))
+    if (http_verify_prepare(hc, &v)) {
+      hc->hc_access = NULL;
       return -1;
+    }
     hc->hc_access = access_get((struct sockaddr *)hc->hc_peer, hc->hc_username,
                                http_verify_callback, &v);
     http_verify_free(&v);