From: Jiri Slaby <jirislaby@kernel.org>
To: Abdun Nihaal <abdun.nihaal@gmail.com>, nbd@nbd.name
Cc: lorenzo@kernel.org, ryder.lee@mediatek.com,
shayne.chen@mediatek.com, sean.wang@mediatek.com,
matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com,
kvalo@kernel.org, toke@toke.dk, jeff.johnson@oss.qualcomm.com,
u.kleine-koenig@baylibre.com, linux-wireless@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org
Subject: Re: [PATCH] wifi: mt76: fix potential memory leak in mt76_wmac_probe()
Date: Thu, 10 Jul 2025 07:47:25 +0200 [thread overview]
Message-ID: <354d249c-fd85-4090-af49-25d154f4be24@kernel.org> (raw)
In-Reply-To: <20250709145532.41246-1-abdun.nihaal@gmail.com>
On 09. 07. 25, 16:55, Abdun Nihaal wrote:
> In mt76_wmac_probe(), when the mt76_alloc_device() call succeeds, memory
> is allocated for both struct ieee80211_hw and a workqueue. However, on
> the error path, the workqueue is not freed. Fix that by calling
> mt76_free_device() on the error path.
>
> Fixes: c8846e101502 ("mt76: add driver for MT7603E and MT7628/7688")
> Signed-off-by: Abdun Nihaal <abdun.nihaal@gmail.com>
I am not sure, why I am CCed, but makes sense anyway (free the one
obtained by alloc_ordered_workqueue() in mt76_alloc_device()):
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
--
js
suse labs
prev parent reply other threads:[~2025-07-10 5:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 14:55 [PATCH] wifi: mt76: fix potential memory leak in mt76_wmac_probe() Abdun Nihaal
2025-07-10 5:47 ` Jiri Slaby [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=354d249c-fd85-4090-af49-25d154f4be24@kernel.org \
--to=jirislaby@kernel.org \
--cc=abdun.nihaal@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=jeff.johnson@oss.qualcomm.com \
--cc=kvalo@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=ryder.lee@mediatek.com \
--cc=sean.wang@mediatek.com \
--cc=shayne.chen@mediatek.com \
--cc=toke@toke.dk \
--cc=u.kleine-koenig@baylibre.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).