mqtt: Prevent NULL pointer dereference before assertion checking

Signed-off-by: Axel Lin <axel.lin@ingics.com>
(cherry picked from commit 7faa4bcbe2)
This commit is contained in:
Axel Lin 2017-01-06 18:00:36 +08:00 committed by goldsimon
parent e5071daf45
commit 5fe195c3d3

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);