Search Linux Wireless

Re: [PATCH] wifi: mt76: mt7921: fix memory leak in mt7921_check_offload_capability

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

 



> Fix possible memory leak in mt7921_check_offload_capability routine
> relasing fw data.
> 
> Fixes: 034ae28b56f1 ("wifi: mt76: mt7921: introduce remain_on_channel support")
> Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx>
> ---
>  drivers/net/wireless/mediatek/mt76/mt7921/init.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Felix,

This issue has already a fix in your tree, we can drop the patch as well.

Regards,
Lorenzo

> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7921/init.c b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
> index 542dfd425129..5ec0caa23c23 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7921/init.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7921/init.c
> @@ -175,7 +175,7 @@ u8 mt7921_check_offload_capability(struct device *dev, const char *fw_wm)
>  
>  	if (!fw || !fw->data || fw->size < sizeof(*hdr)) {
>  		dev_err(dev, "Invalid firmware\n");
> -		return -EINVAL;
> +		goto out;
>  	}
>  
>  	data = fw->data;
> @@ -205,7 +205,7 @@ u8 mt7921_check_offload_capability(struct device *dev, const char *fw_wm)
>  
>  		data += le16_to_cpu(rel_info->len) + rel_info->pad_len;
>  	}
> -
> +out:
>  	release_firmware(fw);
>  
>  	return features ? features->data : 0;
> -- 
> 2.39.0
> 

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux