Fix Coverity ID 592
authorVolker Lendecke <vl@samba.org>
Sun, 31 Aug 2008 09:34:01 +0000 (11:34 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 31 Aug 2008 09:36:27 +0000 (11:36 +0200)
The scanner did not figure out that we always have a primary domain, so it
complained about us potentially passing a NULL pointer down to
set_domain_online_request() where it is dereferenced.

Make the code a bit clearer.
(This used to be commit e6e8d108f95ed974f98f3f57adcfbbde4e00fad9)

source3/winbindd/winbindd_dual.c

index 916e8c07c76f118856ad3c3857e1bbd86a0ea20e..63ce0e8d7fbddc1f5b370834d17d5c38133758d9 100644 (file)
@@ -1212,6 +1212,10 @@ static bool fork_domain_child(struct winbindd_child *child)
                }
        }
 
+       if (primary_domain == NULL) {
+               smb_panic("no primary domain found");
+       }
+
        /* Ensure we're not handling an event inherited from
           our parent. */