Re: [PATCH 6/6] xfs_db: free flist on error in write_struct()

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

 



On Fri, Aug 01, 2014 at 09:59:19AM -0500, Eric Sandeen wrote:
> One error path in write_struct() wasn't freeing
> the flist_t *fl which was allocated, so it leaks.
> 
> Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
> ---

Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>

>  db/write.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/db/write.c b/db/write.c
> index 0157a44..a0f14f4 100644
> --- a/db/write.c
> +++ b/db/write.c
> @@ -652,6 +652,7 @@ write_struct(
>  	buf = convert_arg(argv[1], bit_length);
>  	if (!buf) {
>  		dbprintf(_("unable to convert value '%s'.\n"), argv[1]);
> +		flist_free(fl);
>  		return;
>  	}
>  
> -- 
> 1.7.1
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux