testsuite: Fix a few memory leaks
authorMatthias Clasen <mclasen@redhat.com>
Tue, 14 Sep 2021 12:24:36 +0000 (08:24 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 31 Oct 2021 21:52:04 +0000 (17:52 -0400)
These are keeping the asan build in ci from passing.

testsuite/gtk/fnmatch.c
testsuite/gtk/texthistory.c

index e16bdae016bc269ffb304e7a895a79d439398c7c..25bbc7b0e610f10d441ec03542b745ce75c82aa3 100644 (file)
@@ -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 ();
index 505e6d789361098d0c6410dca830d94102e4d1e2..a740d3523b4abb4fc90c13226928aed20f7994ac 100644 (file)
@@ -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