btrfs: ref-verify: fix memory leak in btrfs_ref_tree_mod
authorDinghao Liu <dinghao.liu@zju.edu.cn>
Wed, 21 Oct 2020 05:36:55 +0000 (13:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Nov 2020 18:18:48 +0000 (19:18 +0100)
commitf136ce570b384e32b66f06898f04bedb25b5df88
tree8a2b9d69c11f5c459b37586e57f00660a1df4e49
parent9d9ad220bb414da6e8b6ae0e35f9e4db976a97ef
btrfs: ref-verify: fix memory leak in btrfs_ref_tree_mod

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