summaryrefslogtreecommitdiff
path: root/src/libtracker-sparql
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2023-01-17 02:39:02 +0100
committerCarlos Garnacho <carlosg@gnome.org>2023-01-17 11:29:27 +0100
commite5d3f19acdc6188cf39d0a98555e076002823594 (patch)
tree89ac83fb564ee4ded8b41fef6b8f91fec34cc0dd /src/libtracker-sparql
parent319af89b26b3a99107ff22d07ec4d2eb255ea40b (diff)
downloadtracker-e5d3f19acdc6188cf39d0a98555e076002823594.tar.gz
bus: Fix GVariant refcount
As g_variant_builder_add() consumes references of passed variants, we should pass an additional reference here.
Diffstat (limited to 'src/libtracker-sparql')
-rw-r--r--src/libtracker-sparql/bus/tracker-bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libtracker-sparql/bus/tracker-bus.c b/src/libtracker-sparql/bus/tracker-bus.c
index 46b6c35ba..117cc34e6 100644
--- a/src/libtracker-sparql/bus/tracker-bus.c
+++ b/src/libtracker-sparql/bus/tracker-bus.c
@@ -255,7 +255,7 @@ convert_params (GHashTable *parameters)
while (g_hash_table_iter_next (&iter, (gpointer*) &name, (gpointer*) &value)) {
g_variant_builder_open (&builder, G_VARIANT_TYPE ("{sv}"));
g_variant_builder_add (&builder, "s", name);
- g_variant_builder_add (&builder, "v", value);
+ g_variant_builder_add (&builder, "v", g_variant_ref (value));
g_variant_builder_close (&builder);
}