fix uninitialised use of samctx
authorAndrew Tridgell <tridge@samba.org>
Mon, 1 Jun 2009 03:42:51 +0000 (13:42 +1000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 1 Jun 2009 03:42:51 +0000 (13:42 +1000)
source4/nbt_server/dgram/netlogon.c

index 2ed37fde59dcae385c8524ff368f217c29b72fef..8fec15a675cfec2a1b4adcf211aed5c0a1a69f50 100644 (file)
@@ -53,6 +53,8 @@ static void nbtd_netlogon_getdc(struct dgram_mailslot_handler *dgmslot,
                return;
        }
 
+       samctx = iface->nbtsrv->sam_ctx;
+
        if (lp_server_role(iface->nbtsrv->task->lp_ctx) != ROLE_DOMAIN_CONTROLLER
            || !samdb_is_pdc(samctx)) {
                DEBUG(2, ("Not a PDC, so not processing LOGON_PRIMARY_QUERY\n"));