[gtk/ngl-uninitialized-matrix: 3/4] reftests: Plug a few memory leaks




commit 34883b7142bbaec2e42f8d44973feccce3a7e05a
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Mar 27 16:23:17 2021 -0400

    reftests: Plug a few memory leaks
    
    Noticed in passing.

 testsuite/reftests/gtk-reftest.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/testsuite/reftests/gtk-reftest.c b/testsuite/reftests/gtk-reftest.c
index 7e2be7ee1d..38a2817ddf 100644
--- a/testsuite/reftests/gtk-reftest.c
+++ b/testsuite/reftests/gtk-reftest.c
@@ -322,12 +322,16 @@ test_ui_file (GFile *file)
   if (diff_image)
     {
       save_image (diff_image, ui_file, ".diff.png");
+      cairo_surface_destroy (diff_image);
       g_test_fail ();
     }
 
   remove_extra_css (provider);
 
   g_free (ui_file);
+
+  cairo_surface_destroy (ui_image);
+  cairo_surface_destroy (reference_image);
 }
 
 static int


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]