From 5aeb954ba9382e1975c64ac96f1e377ed6af3ae0 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 9 Oct 2009 22:58:14 +0200 Subject: s3: Fix a memleak reported by dmarkey --- nsswitch/libwbclient/wbc_sid.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'nsswitch') diff --git a/nsswitch/libwbclient/wbc_sid.c b/nsswitch/libwbclient/wbc_sid.c index b1ecba3f6d..99c9d8e152 100644 --- a/nsswitch/libwbclient/wbc_sid.c +++ b/nsswitch/libwbclient/wbc_sid.c @@ -248,9 +248,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; -- cgit