`io_uring_free_probe()` should really be used to free the return value of `io_uring_get_probe_ring()`. As we may not always allocate it with `malloc()`. For example, to support no libc build [1]. Cc: Bedirhan KURT <windowz414@xxxxxxxxxxx> Cc: Louvian Lyndal <louvianlyndal@xxxxxxxxx> Link: https://github.com/axboe/liburing/issues/443 [1] Signed-off-by: Ammar Faizi <ammar.faizi@xxxxxxxxxxxxxxxxxxxxx> --- test/iopoll.c | 2 +- test/read-write.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/iopoll.c b/test/iopoll.c index de36473..4bfc26a 100644 --- a/test/iopoll.c +++ b/test/iopoll.c @@ -306,7 +306,7 @@ static int probe_buf_select(void) fprintf(stdout, "Buffer select not supported, skipping\n"); return 0; } - free(p); + io_uring_free_probe(p); return 0; } diff --git a/test/read-write.c b/test/read-write.c index 885905b..d54ad0e 100644 --- a/test/read-write.c +++ b/test/read-write.c @@ -480,7 +480,7 @@ static int test_buf_select(const char *filename, int nonvec) fprintf(stdout, "Buffer select not supported, skipping\n"); return 0; } - free(p); + io_uring_free_probe(p); /* * Write out data with known pattern -- 2.30.2