On Wed, Jan 31, 2018 at 4:49 PM, Vishal Verma <[email protected]> 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 <[email protected]>
> Signed-off-by: Vishal Verma <[email protected]>
> ---
>  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 <[email protected]>
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to