diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-04-12 00:12:02 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-04-12 00:14:08 +0200 |
commit | 0cee4aa92f5b9b213856c8ba1ab84c34d73c943b (patch) | |
tree | 182725de3f49afc40a87ffbe8b95d771173aa7b1 | |
parent | 5473a1747a7bd10a7a271c7e01e942711a707bb8 (diff) | |
download | glibc-0cee4aa92f5b9b213856c8ba1ab84c34d73c943b.tar.gz glibc-0cee4aa92f5b9b213856c8ba1ab84c34d73c943b.tar.xz glibc-0cee4aa92f5b9b213856c8ba1ab84c34d73c943b.zip |
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.
-rw-r--r-- | rt/aio_misc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rt/aio_misc.c b/rt/aio_misc.c index 49ec0aa293..4b850b1ab6 100644 --- a/rt/aio_misc.c +++ b/rt/aio_misc.c @@ -702,7 +702,7 @@ __aio_freemem (void) { size_t row; - for (row = 0; row < pool_max_size; ++row) + for (row = 0; row < pool_size; ++row) free (pool[row]); free (pool); |