From fb36f9a7e5456db948263dfb800d2e5bddb27765 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 9 Sep 2010 13:00:54 -0400 Subject: [PATCH] Fix an uninitialized-variable warning on windows --- test/regress_iocp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/regress_iocp.c b/test/regress_iocp.c index 920da2a7..a00ec08f 100644 --- a/test/regress_iocp.c +++ b/test/regress_iocp.c @@ -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; -- 2.40.0