tuanpmt / esp_mqtt

MQTT client library for ESP8266
http://tuanpm.net/post/esp_mqtt/
MIT License
1.14k stars 400 forks source link

null check client pointer before deref #156

Open st0ff3r opened 5 years ago

st0ff3r commented 5 years ago

if (client == NULL) return; // aborted connection

https://github.com/tuanpmt/esp_mqtt/blob/37cab7cd8a42d51dc9ca448a6eef447ce8ce5b3e/mqtt/mqtt.c#L528

as done in https://github.com/arduino-org/Esp-Link/blob/master/mqtt/mqtt.c