Re: [PATCH] nfp: abm: fix a memory leak bug

From: Jakub Kicinski
Date: Mon May 04 2020 - 13:01:32 EST


On Sat, 2 May 2020 17:42:59 -0500 wu000273@xxxxxxx wrote:
> From: Qiushi Wu <wu000273@xxxxxxx>
>
> In function nfp_abm_vnic_set_mac, pointer nsp is allocated by nfp_nsp_open.
> But when nfp_nsp_has_hwinfo_lookup fail, the pointer is not released,
> which can lead to a memory leak bug. Fix this issue by adding
> nfp_nsp_close(nsp) in the error path.
>
> Signed-off-by: Qiushi Wu <wu000273@xxxxxxx>

Fixes: f6e71efdf9fb1 ("nfp: abm: look up MAC addresses via management FW")
Acked-by: Jakub Kicinski <kuba@xxxxxxxxxx>