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

COVA10141: explicitly check there is a protocol set

This commit is contained in:
Andy Green 2019-08-07 07:39:16 +01:00
parent 7f6afa6985
commit 4da5b63e57

View file

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