[geocode-glib/gnome-3-12] test-geouri: fix memory leaks



commit 88ed3f18cb5e72185dcf7e54456c7edd86a6446b
Author: Jonas Danielsson <jonas threetimestwo org>
Date:   Thu May 8 12:15:19 2014 +0200

    test-geouri: fix memory leaks
    
    https://bugzilla.gnome.org/show_bug.cgi?id=727861

 geocode-glib/test-geouri.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/geocode-glib/test-geouri.c b/geocode-glib/test-geouri.c
index 97f1b89..170d649 100644
--- a/geocode-glib/test-geouri.c
+++ b/geocode-glib/test-geouri.c
@@ -83,11 +83,12 @@ test_valid_uri (void)
                 if (uris[i].valid) {
                         g_assert (success);
                         g_assert (error == NULL);
-                        g_object_unref (loc);
                 } else {
                         g_assert (!success);
                         g_assert (error != NULL);
+                        g_error_free (error);
                 }
+                g_object_unref (loc);
         }
 }
 


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