As on json-c 0.11, there's no assert to check for the ref_count, we wont get
crashed. But on json-c 0.13.1 (latest release), json_object_put will check
for the ref_count first, so mtcAgent will crash.
Test Done:
Run mtcAgent with json-c version 0.13.1 with this patch, no crash found.
Closes-Bug: 1807097
Change-Id: I35e5c1cad2e16ee0b6fc639380f1bdd3b64a7018
Signed-off-by: Yan Chen <email address hidden>
Reviewed: https:/ /review. openstack. org/623367 /git.openstack. org/cgit/ openstack/ stx-metal/ commit/ ?id=1c38aff32a0 8cdd65080b8baa6 d4fe02ee2083a4
Committed: https:/
Submitter: Zuul
Branch: master
commit 1c38aff32a08cdd 65080b8baa6d4fe 02ee2083a4
Author: Yan Chen <email address hidden>
Date: Fri Dec 7 19:20:16 2018 +0800
No json_object_put() for the json_obj created by json_object_ object_ get_ex( ).
It is stated in the json_object.h from version 0.11: /github. com/json- c/json- c/blob/ json-c- 0.11/json_ object. h#L271
https:/
As on json-c 0.11, there's no assert to check for the ref_count, we wont get
crashed. But on json-c 0.13.1 (latest release), json_object_put will check
for the ref_count first, so mtcAgent will crash.
Test Done:
Run mtcAgent with json-c version 0.13.1 with this patch, no crash found.
Closes-Bug: 1807097
Change-Id: I35e5c1cad2e16e e0b6fc639380f1b dd3b64a7018
Signed-off-by: Yan Chen <email address hidden>