r16396: Klocwork #1170. Null deref.
authorJeremy Allison <jra@samba.org>
Tue, 20 Jun 2006 01:32:50 +0000 (01:32 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:18:51 +0000 (11:18 -0500)
Jeremy.
(This used to be commit 220627ab70977a9a26dc0e010f73195c2c87ec96)

source3/lib/privileges.c

index d77d7857d72e71831945221052de6aa6e57ce107..d19592e58269b9e5a7ab0bd774b80804d172803c 100644 (file)
@@ -530,6 +530,10 @@ NTSTATUS privilege_enumerate_accounts(DOM_SID **sids, int *num_sids)
        TDB_CONTEXT *tdb = get_account_pol_tdb();
        PRIV_SID_LIST priv;
        
+       if (!tdb) {
+               return NT_STATUS_ACCESS_DENIED;
+       }
+
        ZERO_STRUCT(priv);
 
        se_priv_copy( &priv.privilege, &se_priv_none );