Re: [PATCH 07/14] FIX: Memory leak during Assembly

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

 



On Fri, 16 Sep 2011 13:54:40 +0200 Adam Kwolek <adam.kwolek@xxxxxxxxx> wrote:

> For fdlist pointer allocated in assemble_container_content() function,
> free() is never called. This patch fixes this memory leak.
> 
> Signed-off-by: Adam Kwolek <adam.kwolek@xxxxxxxxx>
> ---
> 
>  Assemble.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/Assemble.c b/Assemble.c
> index 25cfec1..66d2ee4 100644
> --- a/Assemble.c
> +++ b/Assemble.c
> @@ -1584,6 +1584,7 @@ int assemble_container_content(struct supertype *st, int mdfd,
>  				if (fdlist[spare] >= 0)
>  					close(fdlist[spare]);
>  			}
> +			free(fdlist);
>  			if (err) {
>  				fprintf(stderr, Name ": Failed to restore critical"
>  					" section for reshape - sorry.\n");
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


I've applied this fix, thanks.

NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux