From: sashiko-bot@kernel.org
To: liupeng <liupeng01@kylinos.cn>
Cc: linux-hwmon@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/nouveau: Fix memory leaks in debugfs and hwmon init error paths
Date: Mon, 24 Aug 2026 09:12:19 +0000 [thread overview]
Message-ID: <20260824091219.7C5B31F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260824090505.49913-1-liupeng01@kylinos.cn>
> In nouveau_debugfs_init(), if nvif_object_ctor() fails, the previously
> allocated drm->debugfs is leaked because the function returns the
> error code directly.
>
> In nouveau_hwmon_init(), if hwmon_device_register_with_info() fails,
> the allocated hwmon structure is leaked because the function returns
> the error code directly.
>
> Fix both by freeing the allocated memory and clearing the pointer on
> the error paths.
>
> Signed-off-by: liupeng <liupeng01@kylinos.cn>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260824090505.49913-1-liupeng01@kylinos.cn?part=1
prev parent reply other threads:[~2026-08-24 9:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-24 9:05 [PATCH] drm/nouveau: Fix memory leaks in debugfs and hwmon init error paths liupeng
2026-08-24 9:12 ` sashiko-bot [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=20260824091219.7C5B31F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=liupeng01@kylinos.cn \
--cc=sashiko-reviews@lists.linux.dev \
/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).