about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-10-06 17:54:40 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-10-06 17:54:40 +0200
commit1fabb61b4005f80d6a66dd77654d4711de939cc4 (patch)
tree62e1850b04ae802c98369a494d60227b2dce0dc3 /tests
parent6776e3964491f18dac11f7964f12c26190bf971a (diff)
downloadprofani-tty-1fabb61b4005f80d6a66dd77654d4711de939cc4.tar.gz
Fix memleak in cmd_bookmark_list_shows_bookmarks unittest
Regards https://github.com/profanity-im/profanity/issues/1019
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_cmd_bookmark.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/unittests/test_cmd_bookmark.c b/tests/unittests/test_cmd_bookmark.c
index e41929a2..7b385706 100644
--- a/tests/unittests/test_cmd_bookmark.c
+++ b/tests/unittests/test_cmd_bookmark.c
@@ -130,6 +130,22 @@ void cmd_bookmark_list_shows_bookmarks(void **state)
 
     gboolean result = cmd_bookmark(&window, CMD_BOOKMARK, args);
     assert_true(result);
+
+    free(bm1->barejid);
+    free(bm1->nick);
+    free(bm1);
+    free(bm2->barejid);
+    free(bm2->nick);
+    free(bm2);
+    free(bm3->barejid);
+    free(bm3->nick);
+    free(bm3);
+    free(bm4->barejid);
+    free(bm4->nick);
+    free(bm4);
+    free(bm5->barejid);
+    free(bm5->nick);
+    free(bm5);
 }
 
 void cmd_bookmark_add_shows_message_when_invalid_jid(void **state)