diff options
author | Gerald Carter <jerry@samba.org> | 2006-10-26 14:57:11 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2006-10-26 14:57:11 +0000 |
commit | 47dde11977c259e804ae67f1507d0e2f7e8263fc (patch) | |
tree | 68f478569486c25986b003fd62b5b0d40819435f /source/lib/util.c | |
parent | 6cd6987fc504a8056295113c12f629ad5c4b2868 (diff) | |
download | samba-47dde11977c259e804ae67f1507d0e2f7e8263fc.tar.gz samba-47dde11977c259e804ae67f1507d0e2f7e8263fc.tar.xz samba-47dde11977c259e804ae67f1507d0e2f7e8263fc.zip |
r19499: sync up changes for 3.0.23d
Diffstat (limited to 'source/lib/util.c')
-rw-r--r-- | source/lib/util.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/lib/util.c b/source/lib/util.c index 12be5bc6c04..9738326ce67 100644 --- a/source/lib/util.c +++ b/source/lib/util.c @@ -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; |