[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <01724c7be8e023f6b5cd0ac6b48c3e125bc1fd9b.camel@sipsolutions.net>
Date: Tue, 20 Jan 2026 09:16:05 +0100
From: Johannes Berg <johannes@...solutions.net>
To: Zilin Guan <zilin@....edu.cn>, chunkeey@...glemail.com
Cc: quic_rdevanat@...cinc.com, linux-wireless@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] wifi: p54: Fix memory leak in p54_beacon_update()
On Mon, 2026-01-19 at 11:31 +0000, Zilin Guan wrote:
> In p54_beacon_update(), beacon is allocated via ieee80211_beacon_get().
> If p54_beacon_format_ie_tim() fails, the function returns immediately
> without freeing the allocated beacon skb, leading to a memory leak.
>
> Since no other references to this memory exist, it must be freed locally
> before returning the error. Fix this by freeing the buffer using
> dev_kfree_skb_any() in the error path.
>
> Compile tested only. Issue found using a prototype static analysis tool
> and code review.
>
> Fixes: 0ac0d6cedf61 ("p54: Move mac80211 glue code")
That doesn't seem right, although that commit didn't really "move" code,
it added unused code ... but I think that it probably could go further
back.
johannes
Powered by blists - more mailing lists