Linux Netfilter development
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Phil Sutter <phil@nwl.cc>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft] monitor: fix memleak in setelem cb
Date: Wed, 21 Jan 2026 17:04:13 +0100	[thread overview]
Message-ID: <aXD4_Ye_KaOJgywb@strlen.de> (raw)
In-Reply-To: <aXD4dVwPHZHGhhrh@orbyte.nwl.cc>

Phil Sutter <phil@nwl.cc> wrote:
> On Wed, Jan 21, 2026 at 02:39:08PM +0100, Florian Westphal wrote:
> > since 4521732ebbf3 ("monitor: missing cache and set handle initialization")
> > these fields are initied via handle_merge(), so don't clear them in
> > the json output case.  Fixes:
> > 
> > ==31877==ERROR: LeakSanitizer: detected memory leaks
> > Direct leak of 16 byte(s) in 2 object(s) allocated from:
> >  #0 0x7f0cb9f29d4b in strdup asan/asan_interceptors.cpp:593
> >  #1 0x7f0cb9b584fd in xstrdup src/utils.c:80
> >  #2 0x7f0cb9b355b3 in handle_merge src/rule.c:127
> >  #3 0x7f0cb9ae12b8 in netlink_events_setelem_cb src/monitor.c:457
> > 
> > Seen when running tests/monitor with asan enabled.
> > 
> > Signed-off-by: Florian Westphal <fw@strlen.de>
> 
> Looks like a fix of commit 4521732ebbf34 ("monitor: missing cache and
> set handle initialization")?

Yes

      reply	other threads:[~2026-01-21 16:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-21 13:39 [PATCH nft] monitor: fix memleak in setelem cb Florian Westphal
2026-01-21 16:01 ` Phil Sutter
2026-01-21 16:04   ` Florian Westphal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aXD4_Ye_KaOJgywb@strlen.de \
    --to=fw@strlen.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=phil@nwl.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox