Skip to content

Commit

Permalink
tests: internal: stream_processor: fixed memory leak
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Alminana <[email protected]>
  • Loading branch information
leonardo-albertovich committed Sep 26, 2023
1 parent 5197ceb commit 7cf6fbc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/internal/stream_processor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7cf6fbc

Please sign in to comment.