Commit 56d2a48f81a1bde827c625b90221fade72fe9c61

Authored by Ilya Dryomov
Committed by Chris Mason
1 parent 21ca543efc

Btrfs: fix a potential btrfs_bio leak on scrub fixups

In case we were able to map less than we wanted (length < PAGE_SIZE
clause is true) btrfs_bio is still allocated and we have to free it.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

... ... @@ -655,6 +655,7 @@
655 655 "scrub_fixup: btrfs_map_block failed us for %llu\n",
656 656 (unsigned long long)logical);
657 657 WARN_ON(1);
  658 + kfree(bbio);
658 659 return;
659 660 }
660 661