Re: [PATCH] gpio: sloppy-logic-analyzer: Fix memory leak in gpio_la_poll_probe()
From: Wolfram Sang
Date: Mon Jul 13 2026 - 10:54:25 EST
Hi Nihaal,
> What I meant was that after the priv->blob.data is allocated
> successfully in fops_buf_size_set(), the subsequent error returns in
> gpio_la_poll_probe() don't free the buffer, but directly return (since
> all the other allocations are device managed). And so I feel that there
> is a leak possible here.
This is actually true. We should fix this.
> If you prefer, I can remove the return code check for theh
> fops_buf_size_set() call and just have the devm_add_action_or_reset()
> part for releasing.
Yeah, I would like this. I think this part confused me a little when
reviewing. I will accept the patch with the retval check removed.
> We are using a prototype static analysis tool based on LLVM, which we
> are building for a research project.
Well, you got one success report now :)
Thanks and happy hacking,
Wolfram
Attachment:
signature.asc
Description: PGP signature