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




commit 897eee75789faebf6d609c5ee94d74adc1248116
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]