summaryrefslogtreecommitdiffstats
path: root/source/groupdb
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
commit5280c6953195c2664628ecaab59ea82b4863e8f7 (patch)
tree15177bd909477f4a3062dd3a93d3cd8f07c8add7 /source/groupdb
parent7b2c6181b17a0d62043569ffa49cdf6c5b0b6859 (diff)
downloadsamba-5280c6953195c2664628ecaab59ea82b4863e8f7.tar.gz
samba-5280c6953195c2664628ecaab59ea82b4863e8f7.tar.xz
samba-5280c6953195c2664628ecaab59ea82b4863e8f7.zip
Fix memleak in groupdb. Spotted by Metze
Diffstat (limited to 'source/groupdb')
-rw-r--r--source/groupdb/mapping.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/groupdb/mapping.c b/source/groupdb/mapping.c
index ef243ecfc08..5d2d28f1526 100644
--- a/source/groupdb/mapping.c
+++ b/source/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));