Re: [PATCH V3] staging: r8188eu: Directly return _SUCCESS instead of using local ret variable

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

 



在 3/29/22 7:28 PM, Dan Carpenter 写道:
> On Tue, Mar 29, 2022 at 07:09:17PM +0800, Haowen Bai wrote:
>> @@ -534,9 +531,6 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
>>  free_mlme_ext:
>>  	free_mlme_ext_priv(&padapter->mlmeextpriv);
>>  
>> -free_mlme_priv:
>> -	rtw_free_mlme_priv(&padapter->mlmepriv);
> Nope.  We still need to free this on the error path.  Just delete the
> unused label but don't delete the free function.
>
>> -
>>  free_evt_priv:
>>  	rtw_free_evt_priv(&padapter->evtpriv);
> regards,
> dan carpenter
yes, you are right. It will lead to memory leak.

-- 
Haowen Bai





[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