summaryrefslogtreecommitdiff
path: root/nsswitch
diff options
context:
space:
mode:
authorSlava Semushin <php-coder@altlinux.ru>2009-05-23 21:02:40 +0700
committerVolker Lendecke <vl@samba.org>2009-05-25 16:14:16 +0200
commit95dbd7d6dce2583e785a17d5862a1a16838ec352 (patch)
tree410d41e35d674f28cfef8f0582741c06fe36372b /nsswitch
parent4258750e4f112040b3537c2c479f62b6e59b32e3 (diff)
downloadsamba-95dbd7d6dce2583e785a17d5862a1a16838ec352.tar.gz
samba-95dbd7d6dce2583e785a17d5862a1a16838ec352.tar.bz2
samba-95dbd7d6dce2583e785a17d5862a1a16838ec352.zip
nsswitch/winbind_nss_aix.c(fill_grent): fixed memory leak.
Found by cppcheck: [./nsswitch/winbind_nss_aix.c:241]: (error) Memory leak: result
Diffstat (limited to 'nsswitch')
-rw-r--r--nsswitch/winbind_nss_aix.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/nsswitch/winbind_nss_aix.c b/nsswitch/winbind_nss_aix.c
index 17578cf350..66200f3562 100644
--- a/nsswitch/winbind_nss_aix.c
+++ b/nsswitch/winbind_nss_aix.c
@@ -237,6 +237,9 @@ static struct group *fill_grent(struct winbindd_gr *gr, char *gr_mem)
result->gr_mem = (char **)malloc(sizeof(char *) * (gr->num_gr_mem+1));
if (!result->gr_mem) {
+ free(result->gr_name);
+ free(result->gr_passwd);
+ free(result);
errno = ENOMEM;
return NULL;
}