From 5a8fca6f79f9d6688a7804df7a5c0bc55a67b01c Mon Sep 17 00:00:00 2001 From: Andy Green Date: Mon, 19 Mar 2018 08:01:17 +0800 Subject: [PATCH] coverity 188322: confirm wsi->protocol non-NULL before CONNECTION_ERROR --- lib/service.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/service.c b/lib/service.c index ca8fb82d..490a153e 100644 --- a/lib/service.c +++ b/lib/service.c @@ -740,7 +740,7 @@ __lws_service_timeout_check(struct lws *wsi, time_t sec) * cleanup like flush partials. */ wsi->socket_is_permanently_unusable = 1; - if (wsi->mode == LWSCM_WSCL_WAITING_SSL) + if (wsi->mode == LWSCM_WSCL_WAITING_SSL && wsi->protocol) wsi->protocol->callback(wsi, LWS_CALLBACK_CLIENT_CONNECTION_ERROR, wsi->user_space,