lkml.org 
[lkml]   [2012]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs/btrfs/volumes.c: add missing free_fs_devices
On Sat, Apr 14, 2012 at 11:24:33AM +0200, Julia Lawall wrote:
> From: Julia Lawall <Julia.Lawall@lip6.fr>
>
> Free fs_devices as done in the error-handling code just below.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> fs/btrfs/volumes.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> index a872b48..5d246c3 100644
> --- a/fs/btrfs/volumes.c
> +++ b/fs/btrfs/volumes.c
> @@ -4334,8 +4334,10 @@ static int open_seed_devices(struct btrfs_root *root, u8 *fsid)
>
> ret = __btrfs_open_devices(fs_devices, FMODE_READ,
> root->fs_info->bdev_holder);
> - if (ret)
> + if (ret) {
> + free_fs_devices(fs_devices);
> goto out;
> + }
>
> if (!fs_devices->seeding) {
> __btrfs_close_devices(fs_devices);

Reviewed-by: David Sterba <dsterba@suse.cz>

thanks,
david


\
 
 \ /
  Last update: 2012-04-16 16:05    [from the cache]
©2003-2011 Jasper Spaans