lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACOXgS-VN6CDZE2NMtM0TuoRT1UZD1LR0JbY5XOQ6vsVmsTUKw@mail.gmail.com>
Date: Thu, 18 Sep 2025 10:46:32 +0900
From: Masami Ichikawa <masami256@...il.com>
To: Markus Elfring <Markus.Elfring@....de>
Cc: linux-input@...r.kernel.org, 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()

Thank you for the review.

On Wed, Sep 17, 2025 at 4:46 PM Markus Elfring <Markus.Elfring@....de> wrote:
>
> …
> > 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
>

I think using the DEFINE_FREE macro simplifies cleanup, especially
when an error occurs.

> * Can a summary phrase like “Prevent memory leak in ntrig_report_version()”
>   be nicer?
>

I see. I will rewrite commit log.

>
> Regards,
> Markus


Regards,
-- 
Masami Ichikawa

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ