Fix prefs_get_str related leaks in unit tests

Related to https://github.com/profanity-im/profanity/issues/1019
This commit is contained in:
Michael Vetter
2019-06-19 17:15:47 +02:00
parent 184f01c4ac
commit 6c9631d7ea
3 changed files with 15 additions and 0 deletions

View File

@@ -59,6 +59,7 @@ void cmd_otr_log_on_enables_logging(void **state)
assert_true(result);
assert_string_equal("on", pref_otr_log);
prefs_free_string(pref_otr_log);
}
void cmd_otr_log_on_shows_warning_when_chlog_disabled(void **state)
@@ -87,6 +88,7 @@ void cmd_otr_log_off_disables_logging(void **state)
assert_true(result);
assert_string_equal("off", pref_otr_log);
prefs_free_string(pref_otr_log);
}
void cmd_otr_redact_redacts_logging(void **state)
@@ -102,6 +104,7 @@ void cmd_otr_redact_redacts_logging(void **state)
assert_true(result);
assert_string_equal("redact", pref_otr_log);
prefs_free_string(pref_otr_log);
}
void cmd_otr_log_redact_shows_warning_when_chlog_disabled(void **state)