examples/mqttc: If connection() fails, then fd becomes invalid
This commit is contained in:
parent
0ee6f0e5e0
commit
acfd0a9b4e
@ -174,6 +174,7 @@ static int initserver(const FAR struct mqttc_cfg_s *cfg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
close(fd);
|
close(fd);
|
||||||
|
fd = -1;
|
||||||
}
|
}
|
||||||
while ((itr = itr->ai_next) != NULL);
|
while ((itr = itr->ai_next) != NULL);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user