r17872: Fix possible null deref found by the Stanford checker.
authorJeremy Allison <jra@samba.org>
Mon, 28 Aug 2006 04:52:36 +0000 (04:52 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:38:56 +0000 (11:38 -0500)
Jeremy.
(This used to be commit ac06fc42cb9b1e2304d44653614aeaa7c537f34b)

source3/rpc_server/srv_srvsvc_nt.c

index 609c819a7d3412aeda2dc6f9efae099fa1664453..3e79b420a9956a8ab6203b102ee9c8f6199992d8 100644 (file)
@@ -771,7 +771,9 @@ static void init_srv_sess_info_0(SRV_SESS_INFO_0 *ss0, uint32 *snum, uint32 *sto
        (*stot) = list_sessions(&session_list);
 
        if (ss0 == NULL) {
-               (*snum) = 0;
+               if (snum) {
+                       (*snum) = 0;
+               }
                SAFE_FREE(session_list);
                return;
        }