From 1c9d74cfac97e0c8c6224bb00b4fd693ceca0f0a Mon Sep 17 00:00:00 2001 From: alessandronardin Date: Mon, 9 Dec 2024 10:53:44 +0100 Subject: [PATCH] posix/aio: Free requests after handling Requests in rtems_aio_handle were not being freed after they were handled causing resource leaks. This commit adds the necessary free for the requests after processing. Closes #5175 --- cpukit/posix/src/aio_misc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cpukit/posix/src/aio_misc.c b/cpukit/posix/src/aio_misc.c index a130ad0af0..6a1507ed6f 100644 --- a/cpukit/posix/src/aio_misc.c +++ b/cpukit/posix/src/aio_misc.c @@ -704,6 +704,8 @@ static void *rtems_aio_handle( void *arg ) req->listcbp = NULL; req->suspendcbp = NULL; + free(req); + } else { /* If the fd chain is empty we unlock the fd chain and we lock the queue chain, this will ensure that we have at most