Re: [PATCH] staging: greybus: light: fix leak of cdev->name

From: Greg Kroah-Hartman

Date: Thu Jul 30 2026 - 07:18:37 EST


A: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?

http://daringfireball.net/2007/07/on_top

On Thu, Jul 30, 2026 at 05:57:15PM +0700, Nguyễn Công wrote:
> Hi Greg,
> I used an LLM-based agent (Claude) to flag allocations that aren't freed
> on error paths, then I verified this one by hand: I traced every place
> cdev->name (from kasprintf()) is freed and found that
> __gb_lights_led_unregister() misses it on the config-failure and flash
> channel teardown paths. No static-analysis tool was used - just the
> agent to surface the candidate plus manual review.

Then please properly document this as required.

thanks,

greg k-h