From 94e8f4237cc1ae943c6c629a294d9bc514bc1349 Mon Sep 17 00:00:00 2001 From: Phillip Whelan Date: Mon, 6 Nov 2023 21:14:49 -0300 Subject: [PATCH] chunk_trace: add wait in test to avoid use after free in lib callback. Signed-off-by: Phillip Whelan --- tests/runtime/core_chunk_trace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/runtime/core_chunk_trace.c b/tests/runtime/core_chunk_trace.c index 6fb00a9b407..2530da2f4a3 100644 --- a/tests/runtime/core_chunk_trace.c +++ b/tests/runtime/core_chunk_trace.c @@ -107,6 +107,7 @@ void do_test_records_trace(void (*records_cb)(struct callback_records *)) records_cb(records); flb_stop(ctx); + sleep(5); for (i = 0; i < records->num_records; i++) { flb_lib_free(records->records[i].data);