From: Wang Shilong Date: Sun, 31 Mar 2013 10:36:37 +0000 (+0000) Subject: Btrfs: fix double free in the iterate_extent_inodes() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5c2d867fdcbc11a6862379ebd60b2c1a66e13671;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git Btrfs: fix double free in the iterate_extent_inodes() If btrfs_find_all_roots() fails, 'roots' has been freed or 'roots' fails to allocate. We don't need to free it outside btrfs_find_all_roots() again.Fix it. Signed-off-by: Wang Shilong Signed-off-by: Josef Bacik --- diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c index 3dd0693bad7..ba0fee7c323 100644 --- a/fs/btrfs/backref.c +++ b/fs/btrfs/backref.c @@ -1510,11 +1510,9 @@ int iterate_extent_inodes(struct btrfs_fs_info *fs_info, iterate, ctx); } ulist_free(roots); - roots = NULL; } free_leaf_list(refs); - ulist_free(roots); out: if (!search_commit_root) { btrfs_put_tree_mod_seq(fs_info, &tree_mod_seq_elem);