Re: [PATCH] Btrfs: fix memory leak in replace_path

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

 



On Fri, 17 May 2013 16:45:44 +0800, Liu Bo wrote:
> We need to unlock and free extent buffer before the return.
> 
> Signed-off-by: Liu Bo <bo.li.liu@xxxxxxxxxx>
> ---
>  fs/btrfs/relocation.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
> index 704a1b8..5c5b8bb 100644
> --- a/fs/btrfs/relocation.c
> +++ b/fs/btrfs/relocation.c
> @@ -1773,7 +1773,7 @@ again:
>  			if (!eb || !extent_buffer_uptodate(eb)) {
>  				ret = (!eb) ? -ENOMEM : -EIO;
>  				free_extent_buffer(eb);
> -				return ret;
> +				break;
>  			}
>  			btrfs_tree_lock(eb);
>  			if (cow) {
> 

ELATE

5887f17 Btrfs: fix possible memory leak in replace_path()

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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

  Powered by Linux