From 323759c17d93383c83bb96d93e8fa40fcebad4fb Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Mon, 29 Apr 2019 23:29:05 +0100 Subject: [PATCH] Fix crash after client has been unable to connect to a broker This is part of the cleanup routine when the client is already exiting. Closes #1246. Thanks to Christoph Krey. --- ChangeLog.txt | 5 +++++ lib/net_mosq.c | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog.txt b/ChangeLog.txt index 8d5a073e53..7bd7585811 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -8,6 +8,11 @@ Broker: `response-topic`. Closes #1244. - Fix build for WITH_TLS=no. Closes #1250. +Client library: +- Fix crash after client has been unable to connect to a broker. This occurs + when the client is exiting and is part of the final library cleanup routine. + Closes #1246. + 1.6.1 - 20190426 ================ diff --git a/lib/net_mosq.c b/lib/net_mosq.c index c0575dae55..745b1709b4 100644 --- a/lib/net_mosq.c +++ b/lib/net_mosq.c @@ -107,6 +107,7 @@ static void cleanup_ui_method(void) { if(_ui_method){ UI_destroy_method(_ui_method); + _ui_method = NULL; } }