s3:winbindd - fix bad bugfix for bug #10280 - winbind panic if AD server is down.
authorJeremy Allison <jra@samba.org>
Wed, 2 Jul 2014 03:27:11 +0000 (20:27 -0700)
committerMichael Adam <obnox@samba.org>
Wed, 2 Jul 2014 06:03:15 +0000 (08:03 +0200)
Previous bug fix reversed the sense of the test for out of memory.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=10280

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
source3/winbindd/winbindd_cache.c

index 51f3e04eae74d782bbf5fc50312078a6a3ae114d..dfad8f5c0891032ef29f913d62f1e69235e197df 100644 (file)
@@ -2129,14 +2129,14 @@ static NTSTATUS rids_to_names(struct winbindd_domain *domain,
                        have_mapped = have_unmapped = false;
 
                        *names = talloc_array(mem_ctx, char *, num_rids);
-                       if (*names != NULL) {
+                       if (*names == NULL) {
                                result = NT_STATUS_NO_MEMORY;
                                goto error;
                        }
 
                        *types = talloc_array(mem_ctx, enum lsa_SidType,
                                              num_rids);
-                       if (*types != NULL) {
+                       if (*types == NULL) {
                                result = NT_STATUS_NO_MEMORY;
                                goto error;
                        }