netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gopal Yadav <gopunop@gmail.com>
To: "Jose M. Guisado" <guigom@riseup.net>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH 1/1] Solves Bug 1462 - `nft -j list set` does not show counters
Date: Tue, 6 Oct 2020 18:12:24 +0530	[thread overview]
Message-ID: <CAAUOv8iAPJm1mTPjFamEVQAOh1y-ahExN_+4Pk2rPkELwyxBEw@mail.gmail.com> (raw)
In-Reply-To: <2c604efb-39a3-41de-f0a6-a44c703a20df@riseup.net>

On Tue, Oct 6, 2020 at 4:03 PM Jose M. Guisado <guigom@riseup.net> wrote:
>
> Hi Gopal,
>
> On 3/10/20 14:58, Gopal Yadav wrote:
> > +                     tmp = expr->stmt->ops->json(expr->stmt, octx);
>
> You can compact this using stmt_print_json
>
> > +                     json_object_update(root, tmp);
>
> ASAN reports memleaks when using json_object_update. You should use
> json_object_update_new, or maybe json_object_update_missing_new to
> ensure only new keys are created.

Should I always run ASAN before submitting patches as a regular practice?
json_object_update_missing_new() was raising a warning so I have used
json_object_update_missing() in the updated patch.

  reply	other threads:[~2020-10-06 12:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-03 12:58 [PATCH 1/1] Solves Bug 1462 - `nft -j list set` does not show counters Gopal Yadav
2020-10-06 10:33 ` Jose M. Guisado
2020-10-06 12:42   ` Gopal Yadav [this message]
2020-10-06 13:45     ` Jose M. Guisado
2020-10-07  6:28       ` Gopal Yadav

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=CAAUOv8iAPJm1mTPjFamEVQAOh1y-ahExN_+4Pk2rPkELwyxBEw@mail.gmail.com \
    --to=gopunop@gmail.com \
    --cc=guigom@riseup.net \
    --cc=netfilter-devel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).