Yu Kuai 02341a08c9 block: fix memory leak for elevator on add_disk failure
The default elevator is allocated in the beginning of device_add_disk(),
however, it's not freed in the following error path.

Fixes: 50e34d78815e ("block: disable the elevator int del_gendisk")
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jason Yan <yanaijie@huawei.com>
Link: https://lore.kernel.org/r/20221022021615.2756171-1-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-10-22 15:14:38 -06:00
..
2022-10-20 05:50:29 -07:00
2022-10-07 09:19:14 -07:00
2022-10-07 09:19:14 -07:00
2022-03-31 12:58:38 -06:00
2022-02-02 07:49:59 -07:00
2022-07-14 12:14:30 -06:00
2022-08-08 22:37:15 -04:00
2022-03-07 12:48:35 -07:00