From: Samuel Thibault Date: Tue, 11 Apr 2023 22:12:02 +0000 (+0200) Subject: aio: Fix freeing memory X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e47b88d2fb0c740f7ff87fc50a3d299e8396db4f;p=thirdparty%2Fglibc.git aio: Fix freeing memory The content of the pool array is initialized only until pool_size, pointers between pool_size and pool_max_size were not initialized by the realloc call in get_elem so they should not be freed. This fixes aio tests crashing at their termination on GNU/Hurd. (cherry picked from commit 0cee4aa92f5b9b213856c8ba1ab84c34d73c943b) --- diff --git a/rt/aio_misc.c b/rt/aio_misc.c index b4304d0a6f2..5f9e52bcbaf 100644 --- a/rt/aio_misc.c +++ b/rt/aio_misc.c @@ -698,7 +698,7 @@ libc_freeres_fn (free_res) { size_t row; - for (row = 0; row < pool_max_size; ++row) + for (row = 0; row < pool_size; ++row) free (pool[row]); free (pool);