[PATCH 12/14] s3-libsmb: Fix a memory leak in get_pdc_ip().

Andreas Schneider asn at samba.org
Wed Dec 4 06:01:58 MST 2013


Signed-off-by: Andreas Schneider <asn at samba.org>
---
 source3/libsmb/namequery.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c
index f2fffde..7d6d6bb 100644
--- a/source3/libsmb/namequery.c
+++ b/source3/libsmb/namequery.c
@@ -2976,6 +2976,7 @@ bool get_pdc_ip(const char *domain, struct sockaddr_storage *pss)
 					       &count,
 					       lp_name_resolve_order());
 		if (!NT_STATUS_IS_OK(status)) {
+			SAFE_FREE(ip_list);
 			return false;
 		}
 	}
-- 
1.8.5




More information about the samba-technical mailing list