diff options
author | yu kuai <yukuai3@huawei.com> | 2020-06-01 20:38:56 +0800 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-06-02 17:21:50 -0600 |
commit | a75ca9303175d36af93c0937dd9b1a6422908b8d (patch) | |
tree | 9029d26e21a9ee22260f92c711061c3ef78783a1 /drivers/block/loop.c | |
parent | 1ee08de1e234d95b5b4f866878b72fceb5372904 (diff) |
block/bio-integrity: don't free 'buf' if bio_integrity_add_page() failed
commit e7bf90e5afe3 ("block/bio-integrity: fix a memory leak bug") added
a kfree() for 'buf' if bio_integrity_add_page() returns '0'. However,
the object will be freed in bio_integrity_free() since 'bio->bi_opf' and
'bio->bi_integrity' were set previousy in bio_integrity_alloc().
Fixes: commit e7bf90e5afe3 ("block/bio-integrity: fix a memory leak bug")
Signed-off-by: yu kuai <yukuai3@huawei.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Bob Liu <bob.liu@oracle.com>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/loop.c')
0 files changed, 0 insertions, 0 deletions