[PATCH] nvmet: fix memory leak on nvmet_alloc_ctrl()
Chaitanya Kulkarni
Chaitanya.Kulkarni at wdc.com
Tue May 18 13:27:43 PDT 2021
On 5/18/21 01:21, Wu Bo wrote:
> From: Wu Bo <wubo40 at huawei.com>
>
> When cntlid_min is greater than cntlid_max,
> goto wrong label, should be goto out_free_sqs
> label. Otherwise there is a memory leak problem
> on the nvmet_alloc_ctrl function().
>
> Fixes: 94a39d61f80f ("nvmet: make ctrl-id configurable")
> Fixes: 6d65aeab7bf6e ("nvmet: remove unused ctrl->cqs")
> Signed-off-by: Wu Bo <wubo40 at huawei.com>
> ---
Looks good, except commit message could be better :-
When cntlid_min is greater than cntlid_max, goto wrong label, should be
goto out_free_sqs label. Otherwise there is a memory leak problem on the
nvmet_alloc_ctrl function().
Fixes: 94a39d61f80f ("nvmet: make ctrl-id configurable")
Fixes: 6d65aeab7bf6 ("nvmet: remove unused ctrl->cqs")
Signed-off-by: Wu Bo <wubo40 at huawei.com>
with above :-
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
More information about the Linux-nvme
mailing list