diff options
Diffstat (limited to 'nsswitch')
-rw-r--r-- | nsswitch/libwbclient/wbc_pwd.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nsswitch/libwbclient/wbc_pwd.c b/nsswitch/libwbclient/wbc_pwd.c index c7bfdb8fd88..1527808d888 100644 --- a/nsswitch/libwbclient/wbc_pwd.c +++ b/nsswitch/libwbclient/wbc_pwd.c @@ -100,6 +100,11 @@ static void wbcGroupDestructor(void *ptr) free(gr->gr_name); free(gr->gr_passwd); + /* if the array was partly created this can be NULL */ + if (gr->gr_mem == NULL) { + return; + } + for (i=0; gr->gr_mem[i] != NULL; i++) { free(gr->gr_mem[i]); } |