]> granicus.if.org Git - libevent/commitdiff
missing return (-1) for failures on make_socket
authorNiels Provos <provos@gmail.com>
Tue, 27 Feb 2007 08:16:50 +0000 (08:16 +0000)
committerNiels Provos <provos@gmail.com>
Tue, 27 Feb 2007 08:16:50 +0000 (08:16 +0000)
svn:r338

http.c

diff --git a/http.c b/http.c
index 7e9e7d948791b9068b55d9080b297821e77a1b4d..6ff181de2a85bc0caded3ed8432382fcb371bbc4 100644 (file)
--- a/http.c
+++ b/http.c
@@ -2261,7 +2261,7 @@ static int
 make_socket(int should_bind, const char *address, u_short port)
 {
        int fd;
-        struct addrinfo ai, *aitop;
+        struct addrinfo ai, *aitop = NULL;
 #ifdef HAVE_GETADDRINFO
         char strport[NI_MAXSERV];
         int ai_result;
@@ -2276,6 +2276,7 @@ make_socket(int should_bind, const char *address, u_short port)
                         event_warn("getaddrinfo");
                 else
                         event_warnx("getaddrinfo: %s", gai_strerror(ai_result));
+               return (-1);
         }
 #else
        if (fake_getaddrinfo(address, &ai) < 0) {