]> granicus.if.org Git - libevent/commitdiff
Fix an uninitialized-variable warning on windows
authorNick Mathewson <nickm@torproject.org>
Thu, 9 Sep 2010 17:00:54 +0000 (13:00 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 9 Sep 2010 17:00:54 +0000 (13:00 -0400)
test/regress_iocp.c

index 920da2a71711a606510f6ba173178fa4b9c8a490..a00ec08ff1846b35a54bd72a5762d4904776fe0c 100644 (file)
@@ -238,7 +238,7 @@ test_iocp_evbuffer(void *ptr)
        struct event_overlapped rol, wol;
        struct basic_test_data *data = ptr;
        struct event_iocp_port *port = NULL;
-       struct evbuffer *buf;
+       struct evbuffer *buf=NULL;
        struct evbuffer_chain *chain;
        char junk[1024];
        int i;
@@ -288,7 +288,7 @@ end:
        count_free();
        evbuffer_free(rbuf);
        evbuffer_free(wbuf);
-       evbuffer_free(buf);
+       if (buf) evbuffer_free(buf);
 }
 
 static int got_readcb = 0;