about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorJames Booth <boothj5@gmail.com>2014-04-13 01:10:54 +0100
committerJames Booth <boothj5@gmail.com>2014-04-13 01:11:21 +0100
commitf7daaf09538298e7548407a2c5f3c35232e98c66 (patch)
tree6d97e13bce80b58f2b76736b3b30c48c44386816 /src
parent5bb3fab17c08842723dd6af995e150e4d337fa7b (diff)
downloadprofani-tty-f7daaf09538298e7548407a2c5f3c35232e98c66.tar.gz
Clean up after removing bookmark
Issue #194
Diffstat (limited to 'src')
-rw-r--r--src/xmpp/bookmark.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/xmpp/bookmark.c b/src/xmpp/bookmark.c
index 1e1c0ea5..08b36412 100644
--- a/src/xmpp/bookmark.c
+++ b/src/xmpp/bookmark.c
@@ -114,6 +114,8 @@ _bookmark_add(const char *jid, const char *nick, gboolean autojoin)
     GList *found = g_list_find_custom(bookmark_list, item, _match_bookmark_by_jid);
     if (found != NULL) {
         bookmark_list = g_list_remove_link(bookmark_list, found);
+        _bookmark_item_destroy(found->data);
+        g_list_free(found);
     }
     bookmark_list = g_list_append(bookmark_list, item);