about summary refs log tree commit diff stats
path: root/tests/unittests
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2019-10-05 23:38:10 +0200
committerMichael Vetter <jubalh@iodoru.org>2019-10-05 23:38:10 +0200
commitfd18230cd4e8ad21721e582f2b8513b6a403dfba (patch)
tree90d555ea7f14d82c92936fa5cf49e943e651dab5 /tests/unittests
parent4e8f0c90b547211d33fd7c73ef82fdc3a83f3359 (diff)
downloadprofani-tty-fd18230cd4e8ad21721e582f2b8513b6a403dfba.tar.gz
Fix unittest memleak in test_cmd_join
muc_init() call without muc_close()

Regards https://github.com/profanity-im/profanity/issues/1019
Diffstat (limited to 'tests/unittests')
-rw-r--r--tests/unittests/test_cmd_join.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/unittests/test_cmd_join.c b/tests/unittests/test_cmd_join.c
index 19b6da94..a1889fce 100644
--- a/tests/unittests/test_cmd_join.c
+++ b/tests/unittests/test_cmd_join.c
@@ -81,6 +81,8 @@ void cmd_join_uses_account_mucservice_when_no_service_specified(void **state)
 
     gboolean result = cmd_join(NULL, CMD_JOIN, args);
     assert_true(result);
+
+    muc_close();
 }
 
 void cmd_join_uses_supplied_nick(void **state)
@@ -106,6 +108,8 @@ void cmd_join_uses_supplied_nick(void **state)
 
     gboolean result = cmd_join(NULL, CMD_JOIN, args);
     assert_true(result);
+
+    muc_close();
 }
 
 void cmd_join_uses_account_nick_when_not_supplied(void **state)
@@ -131,6 +135,8 @@ void cmd_join_uses_account_nick_when_not_supplied(void **state)
 
     gboolean result = cmd_join(NULL, CMD_JOIN, args);
     assert_true(result);
+
+    muc_close();
 }
 
 void cmd_join_uses_password_when_supplied(void **state)
@@ -159,4 +165,6 @@ void cmd_join_uses_password_when_supplied(void **state)
 
     gboolean result = cmd_join(NULL, CMD_JOIN, args);
     assert_true(result);
+
+    muc_close();
 }