netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Minor memory leak at iptables/nft.c
@ 2025-03-13 14:55 Егор Будюкин
  2025-03-13 16:11 ` Florian Westphal
  0 siblings, 1 reply; 2+ messages in thread
From: Егор Будюкин @ 2025-03-13 14:55 UTC (permalink / raw)
  To: netfilter-devel

Greetings!

I'd like to propose a patch fixing a minor memory leak found with a
static analyzer. It can be found at __add_target and __add_match
functions, where info is callocated as a buffer and not freed
afterwards. This bug can be fixed by adding free() in both functions.
Please inform me if there is a proper way for me to submit this patch
to the upstream.

Best regards,
Egor Budyukin.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Minor memory leak at iptables/nft.c
  2025-03-13 14:55 Minor memory leak at iptables/nft.c Егор Будюкин
@ 2025-03-13 16:11 ` Florian Westphal
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Westphal @ 2025-03-13 16:11 UTC (permalink / raw)
  To: Егор Будюкин
  Cc: netfilter-devel

Егор Будюкин <zhora.budyukin111@gmail.com> wrote:
> I'd like to propose a patch fixing a minor memory leak found with a
> static analyzer. It can be found at __add_target and __add_match
> functions, where info is callocated as a buffer and not freed
> afterwards.

I don't see a bug in either of these functions.
struct nftnl_expr assumes ownership of the allocated blob.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-13 16:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-13 14:55 Minor memory leak at iptables/nft.c Егор Будюкин
2025-03-13 16:11 ` Florian Westphal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).