[tracker/wip/carlosg/deserializer-cursors: 3/15] tests: Do not leak cursors




commit 6e26e0b5c7984be2df4fcebb1a7f9ae880029596
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Apr 27 17:33:58 2022 +0200

    tests: Do not leak cursors
    
    These may lead to FD leaks and other misbehaviors.

 tests/libtracker-sparql/tracker-statement-test.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/tests/libtracker-sparql/tracker-statement-test.c 
b/tests/libtracker-sparql/tracker-statement-test.c
index 10d8d7bd1..09cee6781 100644
--- a/tests/libtracker-sparql/tracker-statement-test.c
+++ b/tests/libtracker-sparql/tracker-statement-test.c
@@ -236,6 +236,7 @@ query_statement (TestFixture   *test_fixture,
                                         test_info->output_file, NULL);
                check_result (cursor, path);
                g_free (path);
+               g_object_unref (cursor);
        } else {
                g_assert_nonnull (error);
        }


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