diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2023-01-17 02:39:02 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2023-01-17 11:29:27 +0100 |
commit | e5d3f19acdc6188cf39d0a98555e076002823594 (patch) | |
tree | 89ac83fb564ee4ded8b41fef6b8f91fec34cc0dd /src/libtracker-sparql | |
parent | 319af89b26b3a99107ff22d07ec4d2eb255ea40b (diff) | |
download | tracker-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.c | 2 |
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); } |