From: Markus Elfring <Markus.Elfring@web.de>
To: Masami Ichikawa <masami256@gmail.com>, linux-input@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Benjamin Tissoires <bentiss@kernel.org>,
Jiri Kosina <jikos@kernel.org>,
Minjong Kim <minbell.kim@samsung.com>
Subject: Re: [PATCH] HID: hid-ntrig: Fix potential memory leak in ntrig_report_version()
Date: Wed, 17 Sep 2025 09:46:40 +0200 [thread overview]
Message-ID: <34b16512-b098-470a-afff-bc8321e2499a@web.de> (raw)
In-Reply-To: <20250917045026.601848-1-masami256@gmail.com>
…
> It is safe to move the kmalloc() call after the hid_is_usb() check to avoid
> unnecessary allocation and potential memory leak.
* See also:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.17-rc6#n94
* How do you think about to increase the application of scope-based resource management?
https://elixir.bootlin.com/linux/v6.17-rc6/source/include/linux/slab.h#L476
* Can a summary phrase like “Prevent memory leak in ntrig_report_version()”
be nicer?
Regards,
Markus
next prev parent reply other threads:[~2025-09-17 7:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-17 4:50 [PATCH] HID: hid-ntrig: Fix potential memory leak in ntrig_report_version() Masami Ichikawa
2025-09-17 7:46 ` Markus Elfring [this message]
2025-09-18 1:46 ` Masami Ichikawa
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=34b16512-b098-470a-afff-bc8321e2499a@web.de \
--to=markus.elfring@web.de \
--cc=bentiss@kernel.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masami256@gmail.com \
--cc=minbell.kim@samsung.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).