From c61a171114e17b770a1a848003ae816156a9673d Mon Sep 17 00:00:00 2001 From: teschi Date: Sat, 23 Feb 2019 22:19:35 +0100 Subject: [PATCH] allow rawlog-buffer to shrink again after lowering "rawlog_lines" --- src/core/rawlog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/rawlog.c b/src/core/rawlog.c index e0c4dd3d..be1412c8 100644 --- a/src/core/rawlog.c +++ b/src/core/rawlog.c @@ -62,7 +62,7 @@ void rawlog_destroy(RAWLOG_REC *rawlog) /* NOTE! str must be dynamically allocated and must not be freed after! */ static void rawlog_add(RAWLOG_REC *rawlog, char *str) { - if (rawlog->lines->length >= rawlog_lines && rawlog_lines > 0) { + while (rawlog->lines->length >= rawlog_lines && rawlog_lines > 0) { void *tmp = g_queue_pop_head(rawlog->lines); g_free(tmp); }