Re: [PATCH] staging: greybus: light: fix leak of cdev->name
From: Nguyễn Công
Date: Sun Aug 02 2026 - 02:11:39 EST
On Thu, Jul 30, 2026 at 6:07 PM Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> 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
Done - added an Assisted-by: tag per and resent as v2:
https://lore.kernel.org/linux-staging/20260802060149.3803224-1-congnt264@xxxxxxxxx/
Sorry about the top-posting.
thanks,
Cong