From 7bbf6ebc7e03b2ca1caa3cf6b5ebb371a42239cb Mon Sep 17 00:00:00 2001 From: Andy Green Date: Sat, 13 Jul 2019 12:00:32 -0700 Subject: [PATCH] COVA11233: add additional deref checks --- lib/core-net/close.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core-net/close.c b/lib/core-net/close.c index 26717b2ec..95b0bf4ef 100644 --- a/lib/core-net/close.c +++ b/lib/core-net/close.c @@ -464,7 +464,7 @@ just_kill_connection: wsi->role_ops->close_cb[lwsi_role_server(wsi)]) { const struct lws_protocols *pro = wsi->protocol; - if (!wsi->protocol) + if (!wsi->protocol && wsi->vhost && wsi->vhost->protocols) pro = &wsi->vhost->protocols[0]; if (!wsi->upgraded_to_http2 || !lwsi_role_client(wsi))