about summary refs log tree commit diff stats
path: root/src/ui
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-11-01 01:48:36 +0000
committerJames Booth <boothj5@gmail.com>2014-11-01 01:48:36 +0000
commitc4412fe82385945a5a056640135e9b53901d563f (patch)
treea1fc7484b7f692ac436da4a69a027b8cbacf9679 /src/ui
parent51164398e3584e78628197d8c365fd79b16ac103 (diff)
downloadprofani-tty-c4412fe82385945a5a056640135e9b53901d563f.tar.gz
Fixed various memory leaks
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/console.c1
-rw-r--r--src/ui/core.c2
-rw-r--r--src/ui/window.c2
3 files changed, 4 insertions, 1 deletions
diff --git a/src/ui/console.c b/src/ui/console.c
index 277a06ce..885dd19d 100644
--- a/src/ui/console.c
+++ b/src/ui/console.c
@@ -739,6 +739,7 @@ _cons_show_account(ProfAccount *account)
             win_save_vprint(console, '-', NULL, NO_DATE, 0, "", "");
             Jid *jidp = jid_create_from_bare_and_resource(account->jid, resource->name);
             Capabilities *caps = caps_lookup(jidp->fulljid);
+            jid_destroy(jidp);
 
             if (caps != NULL) {
                 // show identity
diff --git a/src/ui/core.c b/src/ui/core.c
index f50ad982..08a1afb8 100644
--- a/src/ui/core.c
+++ b/src/ui/core.c
@@ -1519,7 +1519,7 @@ _ui_show_room_disco_info(const char * const room, GSList *identities, GSList *fe
                     identity_str = g_string_append(identity_str, identity->category);
                 }
                 win_save_print(window, '!', NULL, 0, 0, "", identity_str->str);
-                g_string_free(identity_str, FALSE);
+                g_string_free(identity_str, TRUE);
                 identities = g_slist_next(identities);
             }
 
diff --git a/src/ui/window.c b/src/ui/window.c
index 43cfdb92..96a71e5e 100644
--- a/src/ui/window.c
+++ b/src/ui/window.c
@@ -264,6 +264,7 @@ win_show_occupant_info(ProfWin *window, const char * const room, Occupant *occup
 
     Jid *jidp = jid_create_from_bare_and_resource(room, occupant->nick);
     Capabilities *caps = caps_lookup(jidp->fulljid);
+    jid_destroy(jidp);
 
     if (caps) {
         // show identity
@@ -378,6 +379,7 @@ win_show_info(ProfWin *window, PContact contact)
 
         Jid *jidp = jid_create_from_bare_and_resource(barejid, resource->name);
         Capabilities *caps = caps_lookup(jidp->fulljid);
+        jid_destroy(jidp);
 
         if (caps) {
             // show identity