[gnome-calendar] source-dialog: fix memory leak
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar] source-dialog: fix memory leak
- Date: Mon, 25 May 2015 17:04:57 +0000 (UTC)
commit b8fea7f1d149e30a5a730ae21d27de27167de6c6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Fri May 22 22:54:11 2015 -0300
source-dialog: fix memory leak
Free duplicated string when the listbox row is
destroyed.
src/gcal-source-dialog.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/gcal-source-dialog.c b/src/gcal-source-dialog.c
index 744ab1c..a8fbd92 100644
--- a/src/gcal-source-dialog.c
+++ b/src/gcal-source-dialog.c
@@ -1577,10 +1577,9 @@ discover_sources_cb (GObject *source,
g_object_set_data (G_OBJECT (row), "parent-source", source);
g_object_set_data (G_OBJECT (row), "source", new_source);
- g_object_set_data (G_OBJECT (row), "source-url", g_strdup (src->href));
- g_object_set_data (G_OBJECT (row), "source-color", g_strdup (src->color));
- g_object_set_data (G_OBJECT (row), "source-display-name", g_strdup (src->display_name));
- //g_object_set_data (G_OBJECT (row), "source-email", g_strdup (g_slist_nth_data (user_adresses,
counter)));
+ g_object_set_data_full (G_OBJECT (row), "source-url", g_strdup (src->href), g_free);
+ g_object_set_data_full (G_OBJECT (row), "source-color", g_strdup (src->color), g_free);
+ g_object_set_data_full (G_OBJECT (row), "source-display-name", g_strdup (src->display_name),
g_free);
gtk_widget_show_all (row);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]