[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <34b16512-b098-470a-afff-bc8321e2499a@web.de>
Date: Wed, 17 Sep 2025 09:46:40 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Masami Ichikawa <masami256@...il.com>, linux-input@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>,
Benjamin Tissoires <bentiss@...nel.org>, Jiri Kosina <jikos@...nel.org>,
Minjong Kim <minbell.kim@...sung.com>
Subject: Re: [PATCH] HID: hid-ntrig: Fix potential memory leak in
ntrig_report_version()
…
> 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
Powered by blists - more mailing lists