diff --git a/tests/internal/stream_processor.c b/tests/internal/stream_processor.c index 6e9b631713c..44e983a0689 100644 --- a/tests/internal/stream_processor.c +++ b/tests/internal/stream_processor.c @@ -503,6 +503,13 @@ static void test_window() /* We ingest the buffer every second */ for (t = 0; t < check->window_size_sec; t++) { + if (out_buf.buffer != NULL) { + flb_free(out_buf.buffer); + + out_buf.buffer = NULL; + out_buf.size = 0; + } + ret = flb_sp_do_test(sp, task, "samples", strlen("samples"), &data_buf, &out_buf);