Commit c4c23fb6f2b17c922b493f79cf27a0d32397f461
Exists in
ti-lsk-linux-4.1.y
and in
10 other branches
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 cleanup
Showing 1 changed file Side-by-side Diff
fs/btrfs/file-item.c
... | ... | @@ -413,7 +413,7 @@ |
413 | 413 | ret = 0; |
414 | 414 | fail: |
415 | 415 | while (ret < 0 && !list_empty(&tmplist)) { |
416 | - sums = list_entry(&tmplist, struct btrfs_ordered_sum, list); | |
416 | + sums = list_entry(tmplist.next, struct btrfs_ordered_sum, list); | |
417 | 417 | list_del(&sums->list); |
418 | 418 | kfree(sums); |
419 | 419 | } |