[PATCH] lib: ecdsa: fix prevent memory leak in ecdsa_add_verify_data

Tom Rini trini at konsulko.com
Tue Mar 4 19:03:41 CET 2025


On Tue, Mar 04, 2025 at 01:37:21PM +0100, Quentin Schulz wrote:
> Hi Tom,
> 
> On 3/4/25 5:41 AM, Tom Rini wrote:
> > On Fri, 07 Feb 2025 00:47:59 +0300, Anton Moryakov wrote:
> > 
> > > - Ensure `free_ctx` is called in both error and success paths.
> > > - Fix memory leak in `ctx.signature` when `do_add` fails."
> > > 
> > > Triggers found by static analyzer Svace.
> > > 
> > > 
> > 
> > Applied to u-boot/next, thanks!
> > 
> 
> I believe this commit is not doing anything at all, especially not what it
> says it is doing.
> 
> I believe this is a false positive from the static analyzer?

Yeah, you're right. What we had there before was written more compactly
than required, but this ends up being a no-op to the compiler and just
easier to read code.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250304/c1f55de4/attachment.sig>


More information about the U-Boot mailing list