diff options
author | Slava Monich <slava.monich@jolla.com> | 2017-01-02 14:15:08 +0300 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2016-12-30 18:13:06 -0600 |
commit | a011fea4a408615b5d0d3ae56282d06a2fe07cd0 (patch) | |
tree | a728e7d6a273a9a8179060c08d2ed12168dac829 /unit | |
parent | a9a477e469a16ea266bf6484a76ca05e8e3a1b04 (diff) | |
download | ofono-a011fea4a408615b5d0d3ae56282d06a2fe07cd0.tar.gz |
unit: test-sms: Fix memory leaks in the unit test
Diffstat (limited to 'unit')
-rw-r--r-- | unit/test-sms.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/unit/test-sms.c b/unit/test-sms.c index 3d0f016c..618d139f 100644 --- a/unit/test-sms.c +++ b/unit/test-sms.c @@ -1145,6 +1145,8 @@ static void test_assembly(void) reencoded = sms_decode_text(l); + g_slist_free_full(l, g_free); + if (g_test_verbose()) g_printf("ReEncoded:\n%s\n", reencoded); @@ -1304,6 +1306,8 @@ static void test_prepare_concat(gconstpointer data) g_assert(decoded_str); g_assert(strcmp(decoded_str, test->str) == 0); g_free(decoded_str); + g_slist_free_full(pdus, g_free); + g_slist_free_full(r, g_free); sms_assembly_free(assembly); } @@ -1334,6 +1338,7 @@ static void test_limit(gunichar uni, int target_size, gboolean use_16bit) g_assert(g_utf8_strlen(decoded, -1) == target_size); g_free(decoded); + g_slist_free_full(l, g_free); memcpy(utf8 + i, utf8_char, stride); utf8[i+stride] = '\0'; |