From 68c77a51410bd3a1a0fbe61d6714a9a95b4d82cd Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 9 Oct 2009 22:58:14 +0200 Subject: [PATCH] s3: Fix a memleak reported by dmarkey (cherry picked from commit 5aeb954ba9382e1975c64ac96f1e377ed6af3ae0) Fix bug #6797. --- source/nsswitch/libwbclient/wbc_sid.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/nsswitch/libwbclient/wbc_sid.c b/source/nsswitch/libwbclient/wbc_sid.c index 18516b6a2e4..d86e159b5f0 100644 --- a/source/nsswitch/libwbclient/wbc_sid.c +++ b/source/nsswitch/libwbclient/wbc_sid.c @@ -281,9 +281,13 @@ wbcErr wbcLookupSid(const struct wbcDomainSid *sid, if (WBC_ERROR_IS_OK(wbc_status)) { if (pdomain != NULL) { *pdomain = domain; + } else { + TALLOC_FREE(domain); } if (pname != NULL) { *pname = name; + } else { + TALLOC_FREE(name); } if (pname_type != NULL) { *pname_type = name_type; -- 2.47.2