1
0
Fork 0
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:
Andy Green 2020-08-14 09:02:29 +01:00
parent 795d20081e
commit aec2bdec2f

View file

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