Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fix from Chris Mason: "It's a one liner for an error cleanup path that leads to crashes" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: Btrfs: fix kfree on list_head in btrfs_lookup_csums_range error cleanuphifive-unleashed-5.1
commit
c4c23fb6f2
|
@ -413,7 +413,7 @@ int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start, u64 end,
|
||||||
ret = 0;
|
ret = 0;
|
||||||
fail:
|
fail:
|
||||||
while (ret < 0 && !list_empty(&tmplist)) {
|
while (ret < 0 && !list_empty(&tmplist)) {
|
||||||
sums = list_entry(&tmplist, struct btrfs_ordered_sum, list);
|
sums = list_entry(tmplist.next, struct btrfs_ordered_sum, list);
|
||||||
list_del(&sums->list);
|
list_del(&sums->list);
|
||||||
kfree(sums);
|
kfree(sums);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue