[gcr] gcr: Fix a couple memory leaks in the prompter
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcr] gcr: Fix a couple memory leaks in the prompter
- Date: Mon, 19 Dec 2011 07:34:28 +0000 (UTC)
commit 6f8691b7260aa1f4c9b520b75c1a0c10170fa004
Author: Stef Walter <stefw collabora co uk>
Date: Mon Oct 31 17:57:58 2011 +0100
gcr: Fix a couple memory leaks in the prompter
gcr/gcr-system-prompt.c | 1 +
gcr/gcr-system-prompter.c | 18 +++++++++---------
2 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/gcr/gcr-system-prompt.c b/gcr/gcr-system-prompt.c
index 43868d7..eeb615c 100644
--- a/gcr/gcr-system-prompt.c
+++ b/gcr/gcr-system-prompt.c
@@ -241,6 +241,7 @@ gcr_system_prompt_finalize (GObject *obj)
{
GcrSystemPrompt *self = GCR_SYSTEM_PROMPT (obj);
+ g_free (self->pv->prompter_bus_name);
g_hash_table_destroy (self->pv->properties_to_write);
g_hash_table_destroy (self->pv->property_cache);
diff --git a/gcr/gcr-system-prompter.c b/gcr/gcr-system-prompter.c
index cf7eaa9..173d0ec 100644
--- a/gcr/gcr-system-prompter.c
+++ b/gcr/gcr-system-prompter.c
@@ -607,39 +607,39 @@ gcr_system_prompter_class_init (GcrSystemPrompterClass *klass)
g_object_class_install_property (gobject_class, PROP_TITLE,
g_param_spec_string ("title", "Title", "Prompt title",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_MESSAGE,
g_param_spec_string ("message", "Message", "Prompt message",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_DESCRIPTION,
g_param_spec_string ("description", "Description", "Prompt description",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_WARNING,
g_param_spec_string ("warning", "Warning", "Prompt warning",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PASSWORD_NEW,
g_param_spec_boolean ("password-new", "Password new", "Whether is a new password",
- FALSE, G_PARAM_READABLE));
+ FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_PASSWORD_STRENGTH,
g_param_spec_int ("password-strength", "Password strength", "Strength of password",
- 0, G_MAXINT, 0, G_PARAM_READWRITE));
+ 0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_CHOICE_LABEL,
g_param_spec_string ("choice-label", "Choice label", "Label for prompt choice",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_CHOICE_CHOSEN,
g_param_spec_boolean ("choice-chosen", "Choice chosen", "Whether choice is chosen",
- FALSE, G_PARAM_READWRITE));
+ FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_CALLER_WINDOW,
g_param_spec_string ("caller-window", "Caller window", "Window id of caller",
- "", G_PARAM_READABLE));
+ "", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
signals[OPEN] = g_signal_new ("open", GCR_TYPE_SYSTEM_PROMPTER, G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GcrSystemPrompterClass, open),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]