From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH -next] lightnvm: fix possible memory leak in pblk_bb_discovery() To: Wei Yongjun , Matias Bjorling , =?UTF-8?Q?Javier_Gonz=c3=a1lez?= References: <20170425161530.13445-1-weiyj.lk@gmail.com> Cc: Wei Yongjun , linux-block@vger.kernel.org From: Jens Axboe Message-ID: <0e66dbc8-5349-b911-819d-5191598486c5@kernel.dk> Date: Tue, 25 Apr 2017 09:44:55 -0700 MIME-Version: 1.0 In-Reply-To: <20170425161530.13445-1-weiyj.lk@gmail.com> Content-Type: text/plain; charset=utf-8 List-ID: On 04/25/2017 09:15 AM, Wei Yongjun wrote: > From: Wei Yongjun > > '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