forked from SmingHub/Sming
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix memory leak in MqttClient (SmingHub#1742)
* Handle connect message outside of queue, always give it priority * In `copyString`, free destination buffer first to avoid memory leaks * Use helper functions to create, delete and clear messages * Use `MQTT_MALLOC` instead of `malloc` for messages and other items * Remove COPY_STRING macro and handle allocation failures
- Loading branch information
1 parent
e4b63db
commit 6f93d73
Showing
2 changed files
with
83 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters