summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2003-07-04 09:56:50 +0000
committerAlexander Bokovoy <ab@samba.org>2003-07-04 09:56:50 +0000
commitcd6687673a2d741c32997c8d3ce1df8bc61915fa (patch)
treedecb0f92935064cc3636c4c0921c29d60b8f4daf
parent2ceea00187525c379e839e150166f4833ac74735 (diff)
downloadsamba-cd6687673a2d741c32997c8d3ce1df8bc61915fa.tar.gz
samba-cd6687673a2d741c32997c8d3ce1df8bc61915fa.tar.bz2
samba-cd6687673a2d741c32997c8d3ce1df8bc61915fa.zip
Fix memleak in groupdb. Spotted by Metze
(This used to be commit 5280c6953195c2664628ecaab59ea82b4863e8f7)
-rw-r--r--source3/groupdb/mapping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/groupdb/mapping.c b/source3/groupdb/mapping.c
index ef243ecfc0..5d2d28f152 100644
--- a/source3/groupdb/mapping.c
+++ b/source3/groupdb/mapping.c
@@ -683,8 +683,8 @@ BOOL get_uid_list_of_group(gid_t gid, uid_t **uid, int *num_uids)
if( (pwd=getpwnam_alloc(gr)) !=NULL) {
(*uid)[*num_uids]=pwd->pw_uid;
(*num_uids)++;
+ passwd_free(&pwd);
}
- passwd_free(&pwd);
gr = grp->gr_mem[++i];
}
DEBUG(10, ("got [%d] members\n", *num_uids));