From 4da5b63e57b06dbe5c2885ef7144c09033bb1e0d Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 7 Aug 2019 07:39:16 +0100 Subject: [PATCH] COVA10141: explicitly check there is a protocol set --- lib/core-net/close.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/core-net/close.c b/lib/core-net/close.c index 23c1dbb2b..b9d591e12 100644 --- a/lib/core-net/close.c +++ b/lib/core-net/close.c @@ -343,7 +343,8 @@ just_kill_connection: wsi->protocol_bind_balance && wsi->protocol) { lwsl_debug("%s: %p: DROP_PROTOCOL %s\n", __func__, wsi, wsi->protocol ? wsi->protocol->name: "NULL"); - wsi->protocol->callback(wsi, + if (wsi->protocol) + wsi->protocol->callback(wsi, wsi->role_ops->protocol_unbind_cb[ !!lwsi_role_server(wsi)], wsi->user_space, (void *)__func__, 0);