From: Michael Adam Date: Thu, 31 May 2007 23:58:56 +0000 (+0000) Subject: r23284: Oh what a nasty typo! This gave me some headache, X-Git-Tag: samba-misc-tags/initial-v3-0-unstable~300 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7170d2e9f5381b405e0ea902d2b2463e5ca804e6;p=thirdparty%2Fsamba.git r23284: Oh what a nasty typo! This gave me some headache, with talloc randomly failing. Hey, shouldn't TALLOC_ARRAY _not_ return NULL when requested to allocate an array with zero entries? :-) Michael --- diff --git a/source/nsswitch/winbindd_ads.c b/source/nsswitch/winbindd_ads.c index 156dd119a83..222d653fdb2 100644 --- a/source/nsswitch/winbindd_ads.c +++ b/source/nsswitch/winbindd_ads.c @@ -975,7 +975,7 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain, * we try to resolve as many sids as possible from the * cache. Only the rest is passed to the lsa_lookup_sids call. */ - if (num_names) { + if (num_members) { (*sid_mem) = TALLOC_ZERO_ARRAY(mem_ctx, DOM_SID, num_members); (*names) = TALLOC_ZERO_ARRAY(mem_ctx, char *, num_members); (*name_types) = TALLOC_ZERO_ARRAY(mem_ctx, uint32, num_members);