Re: [PATCH v3] staging: rtl8712: fix potential memory leak in _r8712_init_xmit_priv()

From: Dan Carpenter
Date: Tue Oct 04 2022 - 09:38:05 EST


On Tue, Sep 27, 2022 at 08:55:08PM +0800, Xiaoke Wang wrote:
>
> Yes, the memory address is still on the list, and at the above position of
> `Note`, the address of `pxmitpriv->pallocated_frame_buf` is also left on a
> list named `pxmitpriv->free_xmit_queue`.
> However, these lists are in `pxmitpriv` and this function is for
> initializing `pxmitpriv`. When this function fails, the probe function of
> this driver will finally fail. So I guess the list in `pxmitpriv` will not
> be accessed.

Sorry for the delayed response. I think you are right. This patch is
fine then.

Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

regards,
dan carpenter