Re: Re: [PATCH v2 2/2] staging: r8188eu: fix potential memory leak in _rtw_init_xmit_priv()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thu, 31 Mar 2022 19:23:34 +0800, dan.carpenter@xxxxxxxxxx wrote:
>This works...  Presumably, it applies to staging-next even though it
>doesn't apply to linux-next.  So:
>
>Reviewed-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>
>
>In an ideal world, pxmitpriv->pxmitbuf would be declared as an array of
>struct instead of an array of u8.  That would make it much simpler
>because we could do
>
>free_xmit_extbuf:
>	while (--i >= 0)
>		rtw_os_xmit_resource_free(pxmitpriv->pxmit_extbuf[i]);
>	vfree(pxmitpriv->pxmit_extbuf);
>	i = NR_XMITBUFF;
>free_xmitbuf:
>	while (--i >= 0)
>		rtw_os_xmit_resource_free(pxmitpriv->pxmitbuf[i]);
>



This is great! Sorry I did not notice your last email.

My main job is to find, report bugs and provide patches.
In fact, there are so many similar bugs need to be handled in its
family.
Such as _r8712_init_xmit_priv(0 in /drivers/staging/rtl8712/rtl871x_xmit.c
and _rtw_init_xmit_priv() in drivers/staging/rtl8723bs/core\rtw_xmit.c...

So I will try to fix the bugs at first. Actually, the problems you mentioned
also widely exist in its family code.
I suppose those are the style of the code (:
I am happy to improve the code quality itself when I finish
my own work at hand.

Regards,
Xiaoke Wang




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux