summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2018-10-02 01:33:53 (EDT)
committer P. J. McDermott <pj@pehjota.net>2018-10-02 01:33:53 (EDT)
commita029d4d43348e4b30b1a27e000c48935994ce499 (patch)
tree46aca8b4151840390a0e2ad01deabf38f680a607 /src
parentab0e761d739224906beb4ccc717f0197c3d1d748 (diff)
downloadmarquee-a029d4d43348e4b30b1a27e000c48935994ce499.zip
marquee-a029d4d43348e4b30b1a27e000c48935994ce499.tar.gz
marquee-a029d4d43348e4b30b1a27e000c48935994ce499.tar.bz2
MqTabLabel: Set freed strings to NULL
This avoids a double free in finalize(). Also, free scrolled_markup.
Diffstat (limited to 'src')
-rw-r--r--src/tab-label.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tab-label.c b/src/tab-label.c
index 0ad438b..1bce15d 100644
--- a/src/tab-label.c
+++ b/src/tab-label.c
@@ -265,6 +265,7 @@ finalize(GObject *object)
if (tab_label->scrolled_title) {
g_free(tab_label->scrolled_title);
+ g_free(tab_label->scrolled_markup);
}
G_OBJECT_CLASS(mq_tab_label_parent_class)->finalize(object);
@@ -419,6 +420,8 @@ mq_tab_label_end_scrolling(MqTabLabel *tab_label)
tab_label->scrolling = FALSE;
g_free(tab_label->scrolled_title);
g_free(tab_label->scrolled_markup);
+ tab_label->scrolled_title = NULL;
+ tab_label->scrolled_markup = NULL;
update_label(tab_label);
}