r23284: Oh what a nasty typo! This gave me some headache,
authorMichael Adam <obnox@samba.org>
Thu, 31 May 2007 23:58:56 +0000 (23:58 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:23:02 +0000 (12:23 -0500)
with talloc randomly failing.

Hey, shouldn't TALLOC_ARRAY _not_ return NULL when
requested to allocate an array with zero entries? :-)

Michael
(This used to be commit 7170d2e9f5381b405e0ea902d2b2463e5ca804e6)

source3/nsswitch/winbindd_ads.c

index 156dd119a833f3902e81856424b68e381faf5ad3..222d653fdb2aca588fbb8cc4df82f0ef3234e30d 100644 (file)
@@ -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);