btrfs: add NULL check for build_backref_tree()
PATCH 17/18 btrfs: add NULL check for build_backref_tree()
From: Miao Xie <[email protected]>
if passing NULL to btrfs_free_path(),oops will happen. so we must check the pointer passed to it.
Signed-off-by Miao Xie <[email protected]>
--- fs/btrfs/relocation.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
fs/btrfs/relocation.c +4 -2
@@ -816,8 +816,10 @@ next:list_add_tail (&edge->list[UPPER ], &list); } out: -btrfs_free_path (path1); -btrfs_free_path (path2); +if (path1) +btrfs_free_path (path1); +if (path2) +btrfs_free_path (path2);if (err) {INIT_LIST_HEAD (&list); upper = node;
Signature · 1 line
1.6.5.2