On 6/10/20 14:42, Gopal Yadav wrote:
Should I always run ASAN before submitting patches as a regular practice?
I usually check for leaks when submitting patches, using either ASAN or Valgrind.
json_object_update_missing_new() was raising a warning so I have used json_object_update_missing() in the updated patch.
I've been unable to reproduce said warning when using json_object_update_missing_new.
You need to use the *_new function, because it will call json_decref on tmp for you. If not the reference to tmp is leaked.
You should version your patches, have a look at the patch submission guidelines in the nftables wiki [1]
[1] https://wiki.nftables.org/wiki-nftables/index.php/Portal:DeveloperDocs/Patch_submission_guidelines