Fix double free on exit in mosquitto_pub.

Closes #1280. Thanks to Lucky Saini.
This commit is contained in:
Roger A. Light 2019-05-29 18:42:38 +01:00
parent 908d1be6e0
commit 1bafe0ee2e
2 changed files with 4 additions and 0 deletions

View File

@ -43,6 +43,9 @@ Clients:
- Fix MQTT v5 clients not being able to specify a password without a username.
Closes #1274.
Clients:
- Fix double free on exit in mosquitto_pub. Closes #1280.
Documentation:
- Remove references to Python binding and C++ wrapper in libmosquitto man
page. Closes #1266.

View File

@ -508,6 +508,7 @@ int main(int argc, char *argv[])
if(cfg.message && cfg.pub_mode == MSGMODE_FILE){
free(cfg.message);
cfg.message = NULL;
}
mosquitto_destroy(mosq);
mosquitto_lib_cleanup();