From: Matthias Clasen Date: Tue, 14 Sep 2021 12:24:36 +0000 (-0400) Subject: testsuite: Fix a few memory leaks X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2^2~37 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f7b5c886b3fc5ee1a4fd55e108b6d626344d6bce;p=gtk4.git testsuite: Fix a few memory leaks These are keeping the asan build in ci from passing. --- diff --git a/testsuite/gtk/fnmatch.c b/testsuite/gtk/fnmatch.c index e16bdae016..25bbc7b0e6 100644 --- a/testsuite/gtk/fnmatch.c +++ b/testsuite/gtk/fnmatch.c @@ -165,12 +165,14 @@ main (int argc, char *argv[]) { char *path = g_strdup_printf ("/fnmatch/test%d", i); g_test_add_data_func (path, &tests[i], test_fnmatch); + g_free (path); } for (int i = 0; i < G_N_ELEMENTS (citests); i++) { char *path = g_strdup_printf ("/ci-glob/test%d", i); g_test_add_data_func (path, &citests[i], test_ci_glob); + g_free (path); } return g_test_run (); diff --git a/testsuite/gtk/texthistory.c b/testsuite/gtk/texthistory.c index 505e6d7893..a740d3523b 100644 --- a/testsuite/gtk/texthistory.c +++ b/testsuite/gtk/texthistory.c @@ -602,6 +602,8 @@ test14 (void) run_test (commands, G_N_ELEMENTS (commands), 0); g_free (fill); + g_free (fill_after); + g_free (fill_after_2); } static void