From 78cc4adfedfd4c5f68ab90e75675a7a4c06e8766 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Fri, 20 Jul 2012 18:45:12 +0200 Subject: Only g_free() if we g_malloc() with strip_color() --- src/common/text.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/text.c b/src/common/text.c index 246d8e8e..f8f08767 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -386,7 +386,10 @@ scrollback_load (session *sess) cleaned_text = text_replace_non_bmp (text, -1, &cleaned_len); if (cleaned_text != NULL) { - g_free (text); + if (prefs.text_replay_strip_color) + { + g_free (text); + } text = cleaned_text; } fe_print_text (sess, text, stamp); -- cgit 1.4.1