svn commit: samba r2367 - in trunk/source/nsswitch: .
vlendec at samba.org
vlendec at samba.org
Thu Sep 16 12:49:03 GMT 2004
Author: vlendec
Date: 2004-09-16 12:49:02 +0000 (Thu, 16 Sep 2004)
New Revision: 2367
WebSVN: http://websvn.samba.org/websvn/changeset.php?rep=samba&path=/trunk/source/nsswitch&rev=2367&nolog=1
Log:
When there's nothing to malloc there's nothing to be returned...
Volker
Modified:
trunk/source/nsswitch/winbindd_cache.c
Changeset:
Modified: trunk/source/nsswitch/winbindd_cache.c
===================================================================
--- trunk/source/nsswitch/winbindd_cache.c 2004-09-16 12:26:31 UTC (rev 2366)
+++ trunk/source/nsswitch/winbindd_cache.c 2004-09-16 12:49:02 UTC (rev 2367)
@@ -1948,7 +1948,7 @@
num_groups = centry_uint32(centry);
user_sids = talloc(mem_ctx, sizeof(*user_sids) * num_groups);
- if (user_sids == NULL)
+ if ((num_groups != 0) && (user_sids == NULL))
smb_panic("cache_getusersids out of memory");
for (i=0; i<num_groups; i++)
@@ -1963,7 +1963,7 @@
}
ret = malloc(ret_size);
- if (ret == NULL)
+ if ((ret_size != 0) && (ret == NULL))
smb_panic("cache_getusersids out of memory");
ofs = 0;
More information about the samba-cvs
mailing list