xfs
[Top] [All Lists]

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

To: Eric Sandeen <sandeen@xxxxxxxxxx>
Subject: Re: [PATCH 6/6] xfs_db: free flist on error in write_struct()
From: Brian Foster <bfoster@xxxxxxxxxx>
Date: Tue, 5 Aug 2014 09:31:53 -0400
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1406905159-12415-7-git-send-email-sandeen@xxxxxxxxxx>
References: <1406905159-12415-1-git-send-email-sandeen@xxxxxxxxxx> <1406905159-12415-7-git-send-email-sandeen@xxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
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

<Prev in Thread] Current Thread [Next in Thread>