talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit a5fcd7b5d797115135e308e9a25f8436c0462714
parent bd4e7f852004067a820a9f4fd9036ebfc235b1bb
Author: Charles Lehner <charles@claws-mail.org>
Date:   Tue, 21 Jul 2015 20:43:44 -0400

managesieve: fix memory leak

Diffstat:
Msrc/plugins/managesieve/sieve_editor.c | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/plugins/managesieve/sieve_editor.c b/src/plugins/managesieve/sieve_editor.c @@ -158,12 +158,14 @@ static void sieve_editor_set_status_icon(SieveEditorPage *page, const gchar *img } static void sieve_editor_append_status(SieveEditorPage *page, - const gchar *status) + const gchar *new_status) { GtkLabel *label = GTK_LABEL(page->status_text); const gchar *prev_status = gtk_label_get_text(label); const gchar *sep = prev_status && prev_status[0] ? "\n" : ""; - gtk_label_set_text(label, g_strconcat(prev_status, sep, status, NULL)); + gchar *status = g_strconcat(prev_status, sep, new_status, NULL); + gtk_label_set_text(label, status); + g_free(status); } /* Update the status icon and text from a response. */