commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] aio: Fix freeing memory


From: Adhemerval Zanella Netto
Subject: Re: [PATCH] aio: Fix freeing memory
Date: Wed, 12 Apr 2023 09:39:00 -0300
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.1


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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]