From 01441ab02f35bf2ca54dce440ad9440602f46be4 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sun, 25 Sep 2011 02:49:21 +0200 Subject: [PATCH] unix: fix close() of potentially uninitialized fd --- src/unix/udp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/unix/udp.c b/src/unix/udp.c index 20e5f379..bbd645f5 100644 --- a/src/unix/udp.c +++ b/src/unix/udp.c @@ -301,6 +301,7 @@ static int uv__udp_bind(uv_udp_t* handle, saved_errno = errno; status = -1; + fd = -1; /* Check for bad flags. */ if (flags & ~UV_UDP_IPV6ONLY) {