public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] aio: Fix freeing memory
@ 2023-04-12 18:05 Samuel Thibault
  0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2023-04-12 18:05 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0cee4aa92f5b9b213856c8ba1ab84c34d73c943b

commit 0cee4aa92f5b9b213856c8ba1ab84c34d73c943b
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Wed Apr 12 00:12:02 2023 +0200

    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.

Diff:
---
 rt/aio_misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-12 18:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12 18:05 [glibc] aio: Fix freeing memory Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).