summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjospaeth <spaethj@in.tum.de>2020-09-09 21:35:35 +0200
committerjospaeth <spaethj@in.tum.de>2020-09-09 21:35:35 +0200
commitc11faa7df18e14f447872adda3107a1083f5f127 (patch)
tree3fec1f0ae7104f0da105100cbf829c77d8bed226
parentf4a58f964dc53c139ac30b8da8ffa93e838590af (diff)
fix wrong json_decref()
-rw-r--r--src/escrow/plugin_rest_escrow.c5
1 files 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;
}