1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

COVA11233: add additional deref checks

This commit is contained in:
Andy Green 2019-07-13 12:00:32 -07:00
parent e3f895a71d
commit 7bbf6ebc7e

View file

@ -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))