summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 609c819a7d3..3e79b420a99 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;
}