Use the correct function when populating policy property value,
otherwise the temporary objects' refcounts are incremented.
Fixes: c82a26ebf7e9f ("json: Add ct timeout support")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
if (!root)
root = json_object();
- json_object_set(root, timeout_protocol[l4].state_to_name[i],
- json_integer(timeout[i]));
+ json_object_set_new(root, timeout_protocol[l4].state_to_name[i],
+ json_integer(timeout[i]));
}
return root ? : json_null();
}