[PATCH 3/4] wbinfo: Fix a memory leak in wbinfo_ping_dc().

Andreas Schneider asn at samba.org
Thu Jan 9 07:23:42 MST 2014


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

diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index cc75fc3..0937823 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -838,6 +838,7 @@ static bool wbinfo_ping_dc(void)
 		 dcname ? dcname : "",
 		 WBC_ERROR_IS_OK(wbc_status) ? "succeeded" : "failed");
 
+	SAFE_FREE(dcname);
 	if (wbc_status == WBC_ERR_AUTH_ERROR) {
 		d_fprintf(stderr, "error code was %s (0x%x)\n",
 			  error->nt_string, error->nt_status);
-- 
1.8.5.2




More information about the samba-technical mailing list