Do not check for httpd->server_fd6 if it is not initialized
authorJuho Vähä-Herttua <juhovh@iki.fi>
Tue, 15 May 2012 20:11:52 +0000 (23:11 +0300)
committerJuho Vähä-Herttua <juhovh@iki.fi>
Wed, 16 May 2012 21:57:07 +0000 (00:57 +0300)
src/lib/httpd.c

index 7606933696e1cb8548dc57e326bd346221a831d5..88971faa5f57451b22d58a1959da108bd9229e68 100644 (file)
@@ -240,7 +240,7 @@ httpd_thread(void *arg)
                                continue;
                        }
                }
-               if (FD_ISSET(httpd->server_fd6, &rfds)) {
+               if (httpd->server_fd6 != -1 && FD_ISSET(httpd->server_fd6, &rfds)) {
                        ret = httpd_accept_connection(httpd, httpd->server_fd6, 1);
                        if (ret == -1) {
                                break;