summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-08-28 04:52:36 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:38:56 -0500
commitb65eb11a2ec568c9caa0510918cefaad3fa22703 (patch)
tree196601b7337c745c7bcdba09903d11b34640e7b3
parent28369f04b4974092e7fff6d33afeefe4e3a184e1 (diff)
downloadsamba-b65eb11a2ec568c9caa0510918cefaad3fa22703.tar.gz
samba-b65eb11a2ec568c9caa0510918cefaad3fa22703.tar.bz2
samba-b65eb11a2ec568c9caa0510918cefaad3fa22703.zip
r17872: Fix possible null deref found by the Stanford checker.
Jeremy. (This used to be commit ac06fc42cb9b1e2304d44653614aeaa7c537f34b)
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index 609c819a7d..3e79b420a9 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -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;
}