mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
coverity: 324897: mqtt: check unsub var for NULL
This commit is contained in:
parent
795d20081e
commit
aec2bdec2f
1 changed files with 1 additions and 1 deletions
|
@ -1953,7 +1953,7 @@ lws_mqtt_client_send_unsubcribe(struct lws *wsi,
|
|||
unsub->topic[n].name);
|
||||
assert(mysub);
|
||||
|
||||
if (--mysub->ref_count == 0) {
|
||||
if (mysub && --mysub->ref_count == 0) {
|
||||
lwsl_notice("%s: Need to send UNSUB\n", __func__);
|
||||
send_unsub[n] = 1;
|
||||
orphaned++;
|
||||
|
|
Loading…
Add table
Reference in a new issue