lkml.org 
[lkml]   [2020]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 065/101] btrfs: ref-verify: fix memory leak in btrfs_ref_tree_mod
    Date
    From: Dinghao Liu <dinghao.liu@zju.edu.cn>

    commit 468600c6ec28613b756193c5f780aac062f1acdf upstream.

    There is one error handling path that does not free ref, which may cause
    a minor memory leak.

    CC: stable@vger.kernel.org # 4.19+
    Reviewed-by: Josef Bacik <josef@toxicpanda.com>
    Signed-off-by: Dinghao Liu <dinghao.liu@zju.edu.cn>
    Reviewed-by: David Sterba <dsterba@suse.com>
    Signed-off-by: David Sterba <dsterba@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/btrfs/ref-verify.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/fs/btrfs/ref-verify.c
    +++ b/fs/btrfs/ref-verify.c
    @@ -854,6 +854,7 @@ int btrfs_ref_tree_mod(struct btrfs_root
    "dropping a ref for a root that doesn't have a ref on the block");
    dump_block_entry(fs_info, be);
    dump_ref_action(fs_info, ra);
    + kfree(ref);
    kfree(ra);
    goto out_unlock;
    }

    \
     
     \ /
      Last update: 2020-11-17 14:39    [W:4.020 / U:0.432 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site