Patch -- fix a resource leak

Volker Lendecke Volker.Lendecke at SerNet.DE
Sun Nov 25 02:26:44 MST 2012


Hi!

If someone feels like it, please push.

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From a26d4b7a173232ddcd6d7a2128e416dba0ef25a2 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Sun, 25 Nov 2012 10:19:23 +0100
Subject: [PATCH] s3: Fix Coverity ID 741407 -- resource leak

---
 source3/lib/util_sock.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/source3/lib/util_sock.c b/source3/lib/util_sock.c
index 7fcb9c4..2063a58 100644
--- a/source3/lib/util_sock.c
+++ b/source3/lib/util_sock.c
@@ -853,6 +853,7 @@ int open_udp_socket(const char *host, int port)
 	    salen = sizeof(struct sockaddr_in);
 	} else {
 		DEBUG(1, ("unknown socket family %d", ss.ss_family));
+		close(res);
 		return -1;
 	}
 
-- 
1.7.0.4



More information about the samba-technical mailing list