diff options
author | Simon McVittie <smcv@debian.org> | 2020-12-12 17:56:16 +0000 |
---|---|---|
committer | Simon McVittie <smcv@debian.org> | 2020-12-12 17:56:34 +0000 |
commit | 808cad30f81bd98e7416f52a8a9337d088bd48eb (patch) | |
tree | 01da5dc36b488f182dd57673b10569d0bc576547 /tests | |
parent | 7e168dca2438f73cfb8534bb126e799a2185aa5d (diff) | |
download | gdk-pixbuf-808cad30f81bd98e7416f52a8a9337d088bd48eb.tar.gz |
tests: Fix some memory leaks
This is enough to make many of the tests pass under gcc's
AddressSanitizer. pixbuf-randomly-modified still fails when it cannot
allocate more memory, and pixbuf-fail fails with memory allocation
errors unless run with ASAN_OPTIONS=allocator_may_return_null=1.
Signed-off-by: Simon McVittie <smcv@debian.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-common.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test-common.c b/tests/test-common.c index 8ce15dd08..27af94212 100644 --- a/tests/test-common.c +++ b/tests/test-common.c @@ -109,7 +109,7 @@ find_format (const gchar *filename, gchar **found_format) } } - g_free (extensions); + g_strfreev (extensions); if (retval) break; } @@ -296,6 +296,8 @@ add_test_for_all_images (const gchar *prefix, test_path = g_strconcat (prefix, "/", relative_path, NULL); g_test_add_data_func_full (test_path, g_object_ref (file), test_func, g_object_unref); + g_free (relative_path); + g_free (test_path); return; } |