public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Samuel Thibault <sthibaul@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] aio: Fix freeing memory Date: Wed, 12 Apr 2023 18:05:59 +0000 (GMT) [thread overview] Message-ID: <20230412180559.E59AD3858D32@sourceware.org> (raw) 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);
reply other threads:[~2023-04-12 18:05 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230412180559.E59AD3858D32@sourceware.org \ --to=sthibaul@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).