[gnome-keyring] test-dbus-items: Fix memory leak



commit 9af2db3f41e713c02e36dc71f0d6295db7d9e408
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Wed Sep 17 11:48:47 2014 +0200

    test-dbus-items: Fix memory leak
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738508

 daemon/dbus/test-dbus-items.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/daemon/dbus/test-dbus-items.c b/daemon/dbus/test-dbus-items.c
index 43a65cd..412c65d 100644
--- a/daemon/dbus/test-dbus-items.c
+++ b/daemon/dbus/test-dbus-items.c
@@ -159,8 +159,10 @@ test_created_modified_properties (Test *test,
        g_assert_cmpuint (modified, >, (g_get_real_time () / G_TIME_SPAN_SECOND) - 10);
        g_assert_cmpuint (created, ==, modified);
 
-       if (!g_test_thorough ())
+       if (!g_test_thorough ()) {
+               g_free (item);
                return;
+       }
 
        /* Unfortunately have to wait 1.25 seconds here */
        g_usleep (G_TIME_SPAN_SECOND + (G_TIME_SPAN_SECOND / 4));


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