From 3983f01ee7406638e73031571fe9cb08373b2b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Wed, 26 Jan 2022 20:23:16 +0100 Subject: [PATCH] core: set prefix to NULL when clearing a line on a buffer with free content --- src/gui/gui-line.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/gui-line.c b/src/gui/gui-line.c index 89f03be1e..603ae0786 100644 --- a/src/gui/gui-line.c +++ b/src/gui/gui-line.c @@ -1788,9 +1788,10 @@ void gui_line_clear (struct t_gui_line *line) { if (line->data->prefix) + { string_shared_free (line->data->prefix); - line->data->prefix = (char *)string_shared_get (""); - + line->data->prefix = NULL; + } if (line->data->message) free (line->data->message); line->data->message = strdup ("");