1
0
mirror of https://github.com/samba-team/samba.git synced 2025-12-12 12:23:50 +03:00

r19080: Fix a potential NULL dereference

This commit is contained in:
Volker Lendecke
2006-10-04 21:07:05 +00:00
committed by Gerald (Jerry) Carter
parent 7b6738522a
commit 682b490c23

View File

@@ -312,6 +312,13 @@ void add_gid_to_array_unique(TALLOC_CTX *mem_ctx, gid_t gid,
{
int i;
if ((*num_gids != 0) && (*gids == NULL)) {
/*
* A former call to this routine has failed to allocate memory
*/
return;
}
for (i=0; i<*num_gids; i++) {
if ((*gids)[i] == gid)
return;