Re: [PATCH] Coverity: Resource leak: close fds and free array before return

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

 



On 06/16/2018 03:48 PM, Anthony Youngman wrote:
> ---
>  Dump.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Dump.c b/Dump.c
> index 7bdbf6f..38e8f23 100644
> --- a/Dump.c
> +++ b/Dump.c
> @@ -301,6 +301,9 @@ int Restore_metadata(char *dev, char *dir, struct context *c,
>  	}
>  	if (c->verbose >= 0)
>  		printf("%s restored from %s.\n", dev, fname);
> +	close(fl);
> +	close(fd);
> +	free(fname);
>  	return 0;
>  
>  err:
> 

Applied!

Thanks,
Jes

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



[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