* [ndctl PATCH] ndctl: remove a double put in injection status json
@ 2018-02-01 0:49 Vishal Verma
2018-02-01 0:57 ` Dan Williams
0 siblings, 1 reply; 2+ messages in thread
From: Vishal Verma @ 2018-02-01 0:49 UTC (permalink / raw)
To: linux-nvdimm
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 <dan.j.williams@intel.com>
Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
ndctl/inject-error.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/ndctl/inject-error.c b/ndctl/inject-error.c
index 374ae0b..9b9d821 100644
--- a/ndctl/inject-error.c
+++ b/ndctl/inject-error.c
@@ -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;
--
2.14.3
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [ndctl PATCH] ndctl: remove a double put in injection status json
2018-02-01 0:49 [ndctl PATCH] ndctl: remove a double put in injection status json Vishal Verma
@ 2018-02-01 0:57 ` Dan Williams
0 siblings, 0 replies; 2+ messages in thread
From: Dan Williams @ 2018-02-01 0:57 UTC (permalink / raw)
To: Vishal Verma; +Cc: linux-nvdimm
On Wed, Jan 31, 2018 at 4:49 PM, Vishal Verma <vishal.l.verma@intel.com> wrote:
> 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 <dan.j.williams@intel.com>
> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
> ---
> ndctl/inject-error.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/ndctl/inject-error.c b/ndctl/inject-error.c
> index 374ae0b..9b9d821 100644
> --- a/ndctl/inject-error.c
> +++ b/ndctl/inject-error.c
> @@ -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 <dan.j.williams@intel.com>
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-01 0:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-01 0:49 [ndctl PATCH] ndctl: remove a double put in injection status json Vishal Verma
2018-02-01 0:57 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).