From c11faa7df18e14f447872adda3107a1083f5f127 Mon Sep 17 00:00:00 2001 From: jospaeth Date: Wed, 9 Sep 2020 21:35:35 +0200 Subject: fix wrong json_decref() --- src/escrow/plugin_rest_escrow.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/escrow/plugin_rest_escrow.c b/src/escrow/plugin_rest_escrow.c index c5c4dbaf8..2c81c76c8 100644 --- a/src/escrow/plugin_rest_escrow.c +++ b/src/escrow/plugin_rest_escrow.c @@ -653,11 +653,10 @@ get_anchor_from_payload (struct RequestHandle *handle) return NULL; } - json_decref (json_data); - anchor = GNUNET_ESCROW_anchor_string_to_data (anchor_string); if (NULL == anchor) { + json_decref (json_data); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Failed to parse anchor: %s.\n", anchor_string); handle->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR; @@ -666,6 +665,8 @@ get_anchor_from_payload (struct RequestHandle *handle) return NULL; } + json_decref (json_data); + return anchor; } -- cgit v1.2.3