From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Samuel Thibault <samuel.thibault@ens-lyon.org>,
libc-alpha@sourceware.org
Cc: commit-hurd@gnu.org
Subject: Re: [PATCH] aio: Fix freeing memory
Date: Wed, 12 Apr 2023 09:39:00 -0300 [thread overview]
Message-ID: <e1052673-0177-19a1-cd75-3a1bee2c289a@linaro.org> (raw)
In-Reply-To: <20230411221533.317235-1-samuel.thibault@ens-lyon.org>
On 11/04/23 19:15, Samuel Thibault wrote:
> 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.
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> ---
> 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);
next prev parent reply other threads:[~2023-04-12 12:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-11 22:15 Samuel Thibault
2023-04-12 12:39 ` Adhemerval Zanella Netto [this message]
2023-04-12 18:06 ` Samuel Thibault
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=e1052673-0177-19a1-cd75-3a1bee2c289a@linaro.org \
--to=adhemerval.zanella@linaro.org \
--cc=commit-hurd@gnu.org \
--cc=libc-alpha@sourceware.org \
--cc=samuel.thibault@ens-lyon.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: link
Be 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).