From 6a8ff6f7fe858899a2f6418691b01120323a10d4 Mon Sep 17 00:00:00 2001 From: "Schanzenbach, Martin" Date: Wed, 5 Jun 2019 13:00:06 +0200 Subject: fix --- src/reclaim/plugin_rest_reclaim.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/reclaim/plugin_rest_reclaim.c') diff --git a/src/reclaim/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c index 7fe5283c4..9e57f4f46 100644 --- a/src/reclaim/plugin_rest_reclaim.c +++ b/src/reclaim/plugin_rest_reclaim.c @@ -719,15 +719,6 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, GNUNET_memcpy (term_data, handle->rest_handle->data, handle->rest_handle->data_size); data_json = json_loads (term_data, JSON_DECODE_ANY, &err); - GNUNET_assert (GNUNET_OK == - GNUNET_JSON_parse (data_json, tktspec, NULL, NULL)); - json_decref (data_json); - if (NULL == ticket) { - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Unable to parse ticket from %s\n", - term_data); - GNUNET_SCHEDULER_add_now (&do_error, handle); - return; - } if (GNUNET_OK != GNUNET_JSON_parse (data_json, tktspec, NULL, NULL)) { handle->emsg = GNUNET_strdup ("Not a ticket!\n"); GNUNET_SCHEDULER_add_now (&do_error, handle); @@ -735,6 +726,13 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, json_decref (data_json); return; } + json_decref (data_json); + if (NULL == ticket) { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Unable to parse ticket from %s\n", + term_data); + GNUNET_SCHEDULER_add_now (&do_error, handle); + return; + } for (ego_entry = handle->ego_head; NULL != ego_entry; ego_entry = ego_entry->next) { -- cgit v1.2.3