From 4853a5d509b089eb7390b70daafea57b1077e16b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 13 May 2005 09:21:21 +0000 Subject: r6774: Fix 2 memleaks (This used to be commit 6af57d4bae3ee0a28ab12294e813bb37b62e00f5) --- source3/passdb/passdb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3/passdb') diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c index 203fa2bf21..146b3d7a2d 100644 --- a/source3/passdb/passdb.c +++ b/source3/passdb/passdb.c @@ -1194,6 +1194,7 @@ BOOL local_sid_to_uid(uid_t *puid, const DOM_SID *psid, enum SID_NAME_USE *name_ become_root(); if ( !pdb_getsampwsid(sampw, psid) ) { unbecome_root(); + pdb_free_sam(&sampw); DEBUG(8,("local_sid_to_uid: Could not find SID %s in passdb\n", sid_string_static(psid))); return False; @@ -1217,7 +1218,7 @@ BOOL local_sid_to_uid(uid_t *puid, const DOM_SID *psid, enum SID_NAME_USE *name_ (unsigned int)*puid, user_name )); *name_type = SID_NAME_USER; - + pdb_free_sam( &sampw ); return True; } -- cgit