[stx-metal] No need to json_object_put for those json_obj created by json_object_object_get_ex.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
Medium
|
Yan Chen |
Bug Description
Title
-----
[stx-metal] No need to json_object_put for those json_obj created by json_object_
Brief Description
-----------------
Source Code: mtce-common/
There is no need to manually adjust reference counts through the json_object_put(), for those json_obj created by json_object_
This is stated in the json_object.h of json-c, both 0.11 and the latest version.
But on 0.11, json_object_put() will not assert for the ref_count issue, while on the latest version it will.
It is not an urgent issue, but we'd better fix it to follow the json-c spec.
Severity
--------
Critical
Steps to Reproduce
------------------
Run mtcAgent with new version json-c library (test version 0.13.1).
Expected Behavior
------------------
mtcAgent should work properly.
Actual Behavior
----------------
Crashed with assersion:
mtcAgent: json_object.c:189: json_object_put: Assertion `jso->_ref_count > 0' failed.
Reproducibility
---------------
Run mtcAgent with json-c version 0.13.1.
System Configuration
-------
json-c version 0.13.1
Branch/Pull Time/Commit
-------
master
Timestamp/Logs
--------------
2018-12-
2018-12-
2018-12-
2018-12-
2018-12-
2018-12-
2018-12-
mtcAgent: json_object.c:189: json_object_put: Assertion `jso->_ref_count > 0' failed.
./rebuild.sh: line 10: 25083 Aborted sudo ./maintenance/
Changed in starlingx: | |
assignee: | nobody → Yan Chen (ychen2u) |
tags: | added: stx.2019.03 |
tags: |
added: stx.2019.05 removed: stx.2019.03 |
tags: |
added: stx.2.0 removed: stx.2019.05 |
Fix proposed to branch: master /review. openstack. org/623149
Review: https:/