diff --git a/src/core/rawlog.c b/src/core/rawlog.c index f1938ea6..ea2b5e6d 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); }