From 968266b22f449a412889cc7c6d633e4d5d9f4959 Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Sat, 16 May 2009 03:44:51 +0200 Subject: [PATCH] Fix memory leaks. --- autotest/test_message.tcc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/autotest/test_message.tcc b/autotest/test_message.tcc index 34bf7a1..7cc8d76 100644 --- a/autotest/test_message.tcc +++ b/autotest/test_message.tcc @@ -519,6 +519,17 @@ EXO_TEST(adc_message_update_4, { return strlen(g_user->info->cache) == 159; }); +EXO_TEST(adc_message_update_4_cleanup, { + adc_msg_free(updater1); + updater1 = 0; + adc_msg_free(updater2); + updater2 = 0; + adc_msg_free(g_user->info); + g_user->info = 0; + return 1; +}); + + EXO_TEST(adc_message_empty_1, { struct adc_message* msg = adc_msg_parse_verify(g_user, test_string2, strlen(test_string2)); int ok = adc_msg_is_empty(msg) == 0;