[evolution] Bug 730756 - Incorrect g_variant_unref() call after g_variant_builder_end()



commit a21b7112751bc5ff43c73a78402d48443c723025
Author: Milan Crha <mcrha redhat com>
Date:   Mon May 26 12:22:06 2014 +0200

    Bug 730756 - Incorrect g_variant_unref() call after g_variant_builder_end()

 plugins/attachment-reminder/attachment-reminder.c |    3 +--
 plugins/templates/templates.c                     |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/plugins/attachment-reminder/attachment-reminder.c 
b/plugins/attachment-reminder/attachment-reminder.c
index cd41cfb..d3edd3c 100644
--- a/plugins/attachment-reminder/attachment-reminder.c
+++ b/plugins/attachment-reminder/attachment-reminder.c
@@ -350,10 +350,9 @@ commit_changes (UIData *ui)
                valid = gtk_tree_model_iter_next (model, &iter);
        }
 
+       /* A floating GVariant is returned, which is consumed by the g_settings_set_value() */
        v = g_variant_builder_end (&b);
        g_settings_set_value (ui->settings, CONF_KEY_ATTACH_REMINDER_CLUES, v);
-
-       g_variant_unref (v);
 }
 
 static void
diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c
index 358a683..18544c3 100644
--- a/plugins/templates/templates.c
+++ b/plugins/templates/templates.c
@@ -189,9 +189,9 @@ commit_changes (UIData *ui)
                valid = gtk_tree_model_iter_next (model, &iter);
        }
 
+       /* A floating GVariant is returned, which is consumed by the g_settings_set_value() */
        v = g_variant_builder_end (&b);
        g_settings_set_value (ui->settings, CONF_KEY_TEMPLATE_PLACEHOLDERS, v);
-       g_variant_unref (v);
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]