Fixed various memory leaks

This commit is contained in:
James Booth
2014-11-01 01:48:36 +00:00
parent 51164398e3
commit c4412fe823
13 changed files with 47 additions and 16 deletions

View File

@@ -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

View File

@@ -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);
}

View File

@@ -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