Skip to content

Commit

Permalink
COVA10141: explicitly check there is a protocol set
Browse files Browse the repository at this point in the history
  • Loading branch information
lws-team committed Aug 7, 2019
1 parent 2f3269b commit 1702025
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/core-net/close.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ __lws_close_free_wsi(struct lws *wsi, enum lws_close_status reason,
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);
Expand Down

0 comments on commit 1702025

Please sign in to comment.