Re: [PATCH 1/1] Solves Bug 1462 - `nft -j list set` does not show counters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 6, 2020 at 4:03 PM Jose M. Guisado <guigom@xxxxxxxxxx> 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.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux