[gdk-pixbuf] tests: Fix a leak on an error path



commit 28b2aff958ec7d2fb7c81f7c8831f2d157e85406
Author: Philip Withnall <philip tecnocode co uk>
Date:   Mon Dec 12 22:13:10 2016 +0000

    tests: Fix a leak on an error path
    
    Inconsequential leak fix.
    
    Coverity CID 1388539.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=776020

 tests/pixbuf-random.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/tests/pixbuf-random.c b/tests/pixbuf-random.c
index 1f8646b..ff940da 100644
--- a/tests/pixbuf-random.c
+++ b/tests/pixbuf-random.c
@@ -51,6 +51,8 @@ assault (const guchar *header, gsize header_size, int n_images)
       if (err)
        {
          g_error_free (err);
+         g_object_unref (loader);
+         fclose (f);
          continue;
        }
       


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