Re: [PATCH -next] lightnvm: fix possible memory leak in pblk_bb_discovery()

Jens Axboe
2017-04-25T16:44:55Z

On 04/25/2017 09:15 AM, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> 'blks' is malloced in pblk_bb_discovery() and should be freed
> before leaving from the nvm_get_tgt_bb_tbl() error handling cases,
> otherwise it will cause memory leak. Also skip assign blks to
> rlun->bb_list when error.

Added for 4.12, thanks.

--
Jens Axboe