summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam@afuera.me.uk>2022-10-25 11:11:28 +0000
committerSam Thursfield <sam@afuera.me.uk>2022-10-25 11:11:28 +0000
commitb729f671a2e5f0a46d3107db55f4dfcfb4246ca6 (patch)
treee3a16c3b814197067a360db32e4e421c323e572b
parent2fa448244f66681f33d935582038b0569e129cca (diff)
parent7a6412578725e782994a30e429abf9493ac67c7c (diff)
downloadtracker-b729f671a2e5f0a46d3107db55f4dfcfb4246ca6.tar.gz
Merge branch 'wip/carlosg/example-leak' into 'master'
examples: Plug leak in example See merge request https://gitlab.gnome.org/GNOME/tracker/-/merge_requests/548
-rw-r--r--examples/libtracker-sparql/async-connection.c3
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);
}
}