[ekiga/ds-gtk-application] GmInfoBar: Be a good citizen and free memory on destroy.
- From: Damien Sandras <dsandras src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga/ds-gtk-application] GmInfoBar: Be a good citizen and free memory on destroy.
- Date: Sun, 16 Nov 2014 11:54:53 +0000 (UTC)
commit 05b38bd24e2b5b29d4d097bb6a60c4f9e26dfe1f
Author: Damien Sandras <dsandras seconix com>
Date: Sun Nov 16 12:53:22 2014 +0100
GmInfoBar: Be a good citizen and free memory on destroy.
lib/gui/gm-info-bar.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/lib/gui/gm-info-bar.c b/lib/gui/gm-info-bar.c
index 166f9dc..3b1c085 100644
--- a/lib/gui/gm-info-bar.c
+++ b/lib/gui/gm-info-bar.c
@@ -114,11 +114,20 @@ static void
gm_info_bar_dispose (GObject* obj)
{
GmInfoBarPrivate *priv = GM_INFO_BAR (obj)->priv;
+ GSList *l = priv->messages;
if (priv->timeout > 0) {
g_source_remove (priv->timeout);
priv->timeout = 0;
}
+ while (l) {
+ GmMessage *m = (GmMessage *) l->data;
+ if (m->message)
+ g_free (m->message);
+ l = g_slist_next (l);
+ }
+ g_slist_free (priv->messages);
+ priv->messages = NULL;
G_OBJECT_CLASS (gm_info_bar_parent_class)->dispose (obj);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]