diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2022-10-23 13:52:16 +0200 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2022-10-23 13:52:16 +0200 |
commit | 7a6412578725e782994a30e429abf9493ac67c7c (patch) | |
tree | e3a16c3b814197067a360db32e4e421c323e572b /examples | |
parent | 2fa448244f66681f33d935582038b0569e129cca (diff) | |
download | tracker-7a6412578725e782994a30e429abf9493ac67c7c.tar.gz |
examples: Plug leak in example
Also, explicitly use tracker_sparql_cursor_close() to make it a
better example.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/libtracker-sparql/async-connection.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/examples/libtracker-sparql/async-connection.c b/examples/libtracker-sparql/async-connection.c index 40ae55a34..5fc908ea6 100644 --- a/examples/libtracker-sparql/async-connection.c +++ b/examples/libtracker-sparql/async-connection.c @@ -69,6 +69,7 @@ cursor_cb (GObject *object, g_print ("Async cursor next took: %.6f (for all %d results)\n", g_timer_elapsed (md->timer, NULL), i); + tracker_sparql_cursor_close (cursor); g_object_unref (cursor); g_main_loop_quit (md->loop); } @@ -76,6 +77,8 @@ cursor_cb (GObject *object, g_critical ("Could not run cursor next: %s", error->message); g_error_free (error); + tracker_sparql_cursor_close (cursor); + g_object_unref (cursor); g_main_loop_quit (md->loop); } } |