aboutsummaryrefslogtreecommitdiffstats
path: root/facebook/facebook-mqtt.c
diff options
context:
space:
mode:
Diffstat (limited to 'facebook/facebook-mqtt.c')
-rw-r--r--facebook/facebook-mqtt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/facebook/facebook-mqtt.c b/facebook/facebook-mqtt.c
index 8549a1c..9610bbd 100644
--- a/facebook/facebook-mqtt.c
+++ b/facebook/facebook-mqtt.c
@@ -565,6 +565,9 @@ fb_mqtt_cb_open(gpointer data, gint error, gpointer ssl,
gint fd;
if ((ssl == NULL) || (error != SSL_OK)) {
+ /* Set this to null to avoid freeing it in fb_mqtt_close() */
+ priv->ssl = NULL;
+
fb_mqtt_error(mqtt, FB_MQTT_ERROR_GENERAL, "Failed to connect");
return FALSE;
}