mqtt: Prevent NULL pointer dereference before assertion checking

Signed-off-by: Axel Lin <axel.lin@ingics.com>
This commit is contained in:
Axel Lin 2017-01-06 18:00:36 +08:00 committed by Dirk Ziegelmeier
parent 6c9a9b9d99
commit 7faa4bcbe2

View File

@ -281,7 +281,7 @@ mqtt_append_request(struct mqtt_request_t **tail, struct mqtt_request_t *r)
{
struct mqtt_request_t *head = NULL;
s16_t time_before = 0;
struct mqtt_request_t *iter = *tail;
struct mqtt_request_t *iter;
LWIP_ASSERT("mqtt_append_request: tail != NULL", tail != NULL);