[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20251230091725.1140570-1-zilin@seu.edu.cn>
Date: Tue, 30 Dec 2025 09:17:25 +0000
From: Zilin Guan <zilin@....edu.cn>
To: zilin@....edu.cn
Cc: hansg@...nel.org,
ilpo.jarvinen@...ux.intel.com,
jianhao.xu@....edu.cn,
linux-kernel@...r.kernel.org,
platform-driver-x86@...r.kernel.org
Subject: Re: [PATCH] platform/x86/amd: Fix memory leak in wbrf_record()
On Tue, Dec 30, 2025 at 09:51:06AM+0100, Markus Elfring wrote:
> …
> > Fix this by adding a free_tmp label and jumping to it when obj is NULL,
> > ensuring tmp is properly freed.
>
> How do you think about to increase the application of scope-based resource management?
>
> Regards,
> Markus
Thanks for the suggestion.
While scope-based resource management is a valid improvement, I prefer to
keep this patch focused solely on fixing the memory leak using the
existing coding style of the file. This ensures the fix is minimal and
easier to backport.
Such refactoring is arguably outside the scope of this fix.
Regards,
Zilin Guan
Powered by blists - more mailing lists