summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2011-03-19 17:52:35 -0400
committerShaun McCance <shaunm@gnome.org>2011-04-06 17:34:35 -0400
commit6ee2ff5e637fa191f2434629baeed6be66bd4efb (patch)
tree29e8bab4c76e5f352f8f633b48b881f29ce86e93
parent2a473547e6629d5c1eeede86d57e892f7dfdf06c (diff)
downloadyelp-6ee2ff5e637fa191f2434629baeed6be66bd4efb.tar.gz
clear the GVariantBuilder when not setting it
Otherwise it leaks.
-rw-r--r--src/yelp-application.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/yelp-application.c b/src/yelp-application.c
index dac7bf09..7e143afa 100644
--- a/src/yelp-application.c
+++ b/src/yelp-application.c
@@ -766,11 +766,10 @@ yelp_application_update_bookmarks (YelpApplication *app,
}
g_variant_iter_free (iter);
- if (updated) {
- GVariant *value;
- value = g_variant_builder_end (&builder);
- g_settings_set_value (settings, "bookmarks", value);
- }
+ if (updated)
+ g_settings_set (settings, "bookmarks", "a(sss)", builder);
+ else
+ g_variant_builder_clear (&builder);
}
}