[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fbfa6fa1-0a07-4be6-8b3f-b9caa27e892f@RTKEXHMBS03.realtek.com.tw>
Date: Tue, 18 Nov 2025 10:32:19 +0800
From: Ping-Ke Shih <pkshih@...ltek.com>
To: Abdun Nihaal <nihaal@....iitm.ac.in>, Ping-Ke Shih <pkshih@...ltek.com>,
<linux-wireless@...r.kernel.org>
CC: Abdun Nihaal <nihaal@....iitm.ac.in>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] rtl818x_pci: Fix potential memory leaks in rtl8180_init_rx_ring()
Abdun Nihaal <nihaal@....iitm.ac.in> wrote:
> In rtl8180_init_rx_ring(), memory is allocated for skb packets and DMA
> allocations in a loop. When an allocation fails, the previously
> successful allocations are not freed on exit.
>
> Fix that by jumping to err_free_rings label on error, which calls
> rtl8180_free_rx_ring() to free the allocations. Remove the free of
> rx_ring in rtl8180_init_rx_ring() error path, and set the freed
> priv->rx_buf entry to null, to avoid double free.
>
> Fixes: f653211197f3 ("Add rtl8180 wireless driver")
> Signed-off-by: Abdun Nihaal <nihaal@....iitm.ac.in>
> Reviewed-by: Ping-Ke Shih <pkshih@...ltek.com>
1 patch(es) applied to rtw-next branch of rtw.git, thanks.
9b5b9c042b30 wifi: rtl818x: Fix potential memory leaks in rtl8180_init_rx_ring()
---
https://github.com/pkshih/rtw.git
Powered by blists - more mailing lists