Re: [net-next PATCH v10 2/6] octeontx2-af: CN20k basic mbox operations and structures

From: Paolo Abeni
Date: Thu Feb 20 2025 - 06:50:39 EST


On 2/17/25 9:52 AM, Sai Krishna wrote:
> @@ -2443,6 +2469,18 @@ static int rvu_mbox_init(struct rvu *rvu, struct mbox_wq_info *mw,
> }
> }
>
> + ng_rvu_mbox = kzalloc(sizeof(*ng_rvu_mbox), GFP_KERNEL);
> + if (!ng_rvu_mbox) {
> + err = -ENOMEM;
> + goto free_bitmap;
> + }
> +
> + rvu->ng_rvu = ng_rvu_mbox

AFAICS rvu->ng_rvu is freed only by rvu_remove(), so it's leaked on the
later error paths.

/P