summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2005-05-13 09:21:21 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:54 -0500
commit4853a5d509b089eb7390b70daafea57b1077e16b (patch)
tree8b5254e4ce35fc50b92e63064b7cdbf801452950
parent0e5aa494dd57a598ce1ac6e7141273fbe7bcf113 (diff)
downloadsamba-4853a5d509b089eb7390b70daafea57b1077e16b.tar.gz
samba-4853a5d509b089eb7390b70daafea57b1077e16b.tar.bz2
samba-4853a5d509b089eb7390b70daafea57b1077e16b.zip
r6774: Fix 2 memleaks
(This used to be commit 6af57d4bae3ee0a28ab12294e813bb37b62e00f5)
-rw-r--r--source3/passdb/passdb.c3
1 files changed, 2 insertions, 1 deletions
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;
}