[evolution-data-server/gnome-3-10] tests: Fix potential g_object_unref(NULL) calls in libebook tests



commit 3ac44881c3de3dc62e712eb353283c0c98840fe7
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Fri Nov 29 08:58:40 2013 +0000

    tests: Fix potential g_object_unref(NULL) calls in libebook tests
    
    Found by scan-build.
    
    https://bugzilla.gnome.org/719533
    
    (cherry picked from commit fcccd30fb3d34feb2b040bade6c0595314e4e4e5)

 tests/libebook/test-ebook-get-required-fields.c  |    4 ++--
 tests/libebook/test-ebook-get-supported-fields.c |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/libebook/test-ebook-get-required-fields.c b/tests/libebook/test-ebook-get-required-fields.c
index 467258f..634f2f4 100644
--- a/tests/libebook/test-ebook-get-required-fields.c
+++ b/tests/libebook/test-ebook-get-required-fields.c
@@ -33,9 +33,9 @@ get_required_fields_cb (EBookTestClosure *closure)
                        e_iterator_next (iter);
                }
                test_print ("----------------\n");
-       }
 
-       g_object_unref (closure->list);
+               g_object_unref (closure->list);
+       }
 
        g_main_loop_quit ((GMainLoop *) (closure->user_data));
 }
diff --git a/tests/libebook/test-ebook-get-supported-fields.c 
b/tests/libebook/test-ebook-get-supported-fields.c
index 771abdb..e1f5420 100644
--- a/tests/libebook/test-ebook-get-supported-fields.c
+++ b/tests/libebook/test-ebook-get-supported-fields.c
@@ -33,9 +33,9 @@ get_supported_fields_cb (EBookTestClosure *closure)
                        e_iterator_next (iter);
                }
                test_print ("----------------\n");
-       }
 
-       g_object_unref (closure->list);
+               g_object_unref (closure->list);
+       }
 
        g_main_loop_quit ((GMainLoop *) (closure->user_data));
 }


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