Re: Re: [PATCH 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]

 



On Thu, 31 Mar 2022 16:21:43 +0800, xkernel.wang@xxxxxxxxxxx wrote:
>In fact, this is considering that we do not know where is the failure
>from. In rtw_os_xmit_resource_alloc(), the failure can from 
>
>> pxmitbuf->pallocated_buf = kzalloc(alloc_sz, GFP_KERNEL);
>
> , but also can from 
>
>> 		pxmitbuf->pxmit_urb[i] = usb_alloc_urb(0, GFP_KERNEL);
>
> So if we do not handle the current failed item and just skip it, then some
> memory may be ignored.



Maybe this should be the problem of rtw_os_xmit_resource_alloc() as it
does properly handle the error from it.
Anyway, I will attempt to fix them.


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