From: Jeremy Allison Date: Wed, 12 Nov 2008 22:06:47 +0000 (-0800) Subject: Fix memory leak in error path, spotted by Martin Zielinski . X-Git-Tag: samba-4.0.0alpha6~480^2~232^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d67e7f3e15d73201dce2b73ce74c5d5c1cbcf524;p=thirdparty%2Fsamba.git Fix memory leak in error path, spotted by Martin Zielinski . Jeremy. --- diff --git a/source3/winbindd/winbindd_passdb.c b/source3/winbindd/winbindd_passdb.c index 5677c01be14..0cf4540cfef 100644 --- a/source3/winbindd/winbindd_passdb.c +++ b/source3/winbindd/winbindd_passdb.c @@ -267,6 +267,7 @@ static NTSTATUS lookup_usergroups(struct winbindd_domain *domain, } if ( !pdb_getsampwsid( user, user_sid ) ) { + TALLOC_FREE( user ); return NT_STATUS_NO_SUCH_USER; }