about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-07-09 09:47:35 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-07-09 09:47:35 +0200
commit89d8fc846e17001551c7830524229820665e3abe (patch)
tree1557b6ec39cba3f4a4ae3e4f476f985b3bfbf7ea
parent7af85d0fe0fdebb48928385e2afacbdac91bb420 (diff)
downloadprofani-tty-89d8fc846e17001551c7830524229820665e3abe.tar.gz
Fix double free in room id handler
Free is done in destructor now.
Regards https://github.com/profanity-im/profanity/issues/1148
-rw-r--r--src/xmpp/iq.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/xmpp/iq.c b/src/xmpp/iq.c
index 23048b8d..6e89307f 100644
--- a/src/xmpp/iq.c
+++ b/src/xmpp/iq.c
@@ -2069,8 +2069,6 @@ _room_info_response_id_handler(xmpp_stanza_t *const stanza, void *const userdata
             mucwin_room_info_error(mucwin, error_message);
             free(error_message);
         }
-        free(cb_data->room);
-        free(cb_data);
         return 0;
     }
 
@@ -2136,9 +2134,6 @@ _room_info_response_id_handler(xmpp_stanza_t *const stanza, void *const userdata
         g_slist_free_full(identities, (GDestroyNotify)_identity_destroy);
     }
 
-    free(cb_data->room);
-    free(cb_data);
-
     return 0;
 }
 
@@ -2448,8 +2443,8 @@ iq_send_stanza(xmpp_stanza_t *const stanza)
         xmpp_send_raw_string(conn, "%s", text);
     }
     xmpp_free(connection_get_ctx(), text);
-
 }
+
 static void
 _iq_free_room_data(ProfRoomInfoData *roominfo)
 {