ndctl: remove a double put in injection status json
Vishal Verma
maintainerPATCH 1/1 ndctl: remove a double put in injection status json
newer json-c catches a double put of the json object in printing the injection status. We only need to put the containing jobj.
Cc Dan Williams <[email protected]>
Signed-off-by Vishal Verma <[email protected]>
--- ndctl/inject-error.c | 2 -- 1 file changed, 2 deletions(-)
ndctl/inject-error.c +0 -2
@@ -263,8 +263,6 @@ static int injection_status(struct ndctl_namespace *ndns)printf ("%s\n" ,json_object_to_json_string_ext (jobj,JSON_C_TO_STRING_PRETTY )); } - -json_object_put (jbbs);json_object_put (jobj);return rc;
Signature · 6 lines
2.14.3 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 14 lines · Vishal Verma
newer json-c catches a double put of the json object in printing the injection status. We only need to put the containing jobj.
Cc Dan Williams <[email protected]>Signed-off-by Vishal Verma <[email protected]>--- ndctl/inject-error.c | 2 -- 1 file changed, 2 deletions(-)ndctl/inject-error.c +0
-0
ndctl/inject-error.c static int injection_status(struct ndctl_namespace *ndns) · line 266
Quoted 6 lines
ndctl/inject-error.c +0
-2@@ -263,8 +263,6 @@ static int injection_status(struct ndctl_namespace *ndns)printf ("%s\n" ,json_object_to_json_string_ext (jobj,JSON_C_TO_STRING_PRETTY )); } - -json_object_put (jbbs);json_object_put (jobj);
Yeah, once you link an object to a container you only need to put that parent object. Looks good to me.
Reviewed-by Dan Williams <[email protected]>
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm