diff options
author | Alberto Mardegan <alberto.mardegan@canonical.com> | 2012-02-22 12:19:05 +0200 |
---|---|---|
committer | Alberto Mardegan <alberto.mardegan@canonical.com> | 2012-02-22 12:19:05 +0200 |
commit | 1d4ba72aceeb1ca0e65154cb969d95756e9163ca (patch) | |
tree | 79eeee49e78b284dae2148790a3ad27765248bf4 /libdbusmenu-gtk | |
parent | 0c3006bfaac388b88b2597e0959e0ded3bd7be96 (diff) | |
download | libdbusmenu-1d4ba72aceeb1ca0e65154cb969d95756e9163ca.tar.gz libdbusmenu-1d4ba72aceeb1ca0e65154cb969d95756e9163ca.tar.bz2 libdbusmenu-1d4ba72aceeb1ca0e65154cb969d95756e9163ca.zip |
Do not leak the label text
Also, fix the indentation from the previous commit.
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r-- | libdbusmenu-gtk/genericmenuitem.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libdbusmenu-gtk/genericmenuitem.c b/libdbusmenu-gtk/genericmenuitem.c index bdbd190..435c808 100644 --- a/libdbusmenu-gtk/genericmenuitem.c +++ b/libdbusmenu-gtk/genericmenuitem.c @@ -125,6 +125,8 @@ genericmenuitem_dispose (GObject *object) static void genericmenuitem_finalize (GObject *object) { + Genericmenuitem * self = GENERICMENUITEM(object); + g_free(self->priv->label_text); G_OBJECT_CLASS (genericmenuitem_parent_class)->finalize (object); return; @@ -209,7 +211,7 @@ set_label (GtkMenuItem * menu_item, const gchar * in_label) Genericmenuitem * item = GENERICMENUITEM(menu_item); if (in_label != item->priv->label_text) { - g_free (item->priv->label_text); + g_free(item->priv->label_text); item->priv->label_text = g_strdup(in_label); } |