diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-06-05 13:00:06 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-06-05 13:00:06 +0200 |
commit | 6a8ff6f7fe858899a2f6418691b01120323a10d4 (patch) | |
tree | 74ab688b9be16295e571897c387f02331d93b030 /src/reclaim/plugin_rest_reclaim.c | |
parent | 86d974e61bb7be2541f3675913d0d3993bc19987 (diff) | |
download | gnunet-6a8ff6f7fe858899a2f6418691b01120323a10d4.tar.gz gnunet-6a8ff6f7fe858899a2f6418691b01120323a10d4.zip |
fix
Diffstat (limited to 'src/reclaim/plugin_rest_reclaim.c')
-rw-r--r-- | src/reclaim/plugin_rest_reclaim.c | 16 |
1 files changed, 7 insertions, 9 deletions
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, | |||
719 | GNUNET_memcpy (term_data, handle->rest_handle->data, | 719 | GNUNET_memcpy (term_data, handle->rest_handle->data, |
720 | handle->rest_handle->data_size); | 720 | handle->rest_handle->data_size); |
721 | data_json = json_loads (term_data, JSON_DECODE_ANY, &err); | 721 | data_json = json_loads (term_data, JSON_DECODE_ANY, &err); |
722 | GNUNET_assert (GNUNET_OK == | ||
723 | GNUNET_JSON_parse (data_json, tktspec, NULL, NULL)); | ||
724 | json_decref (data_json); | ||
725 | if (NULL == ticket) { | ||
726 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Unable to parse ticket from %s\n", | ||
727 | term_data); | ||
728 | GNUNET_SCHEDULER_add_now (&do_error, handle); | ||
729 | return; | ||
730 | } | ||
731 | if (GNUNET_OK != GNUNET_JSON_parse (data_json, tktspec, NULL, NULL)) { | 722 | if (GNUNET_OK != GNUNET_JSON_parse (data_json, tktspec, NULL, NULL)) { |
732 | handle->emsg = GNUNET_strdup ("Not a ticket!\n"); | 723 | handle->emsg = GNUNET_strdup ("Not a ticket!\n"); |
733 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 724 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
@@ -735,6 +726,13 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
735 | json_decref (data_json); | 726 | json_decref (data_json); |
736 | return; | 727 | return; |
737 | } | 728 | } |
729 | json_decref (data_json); | ||
730 | if (NULL == ticket) { | ||
731 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Unable to parse ticket from %s\n", | ||
732 | term_data); | ||
733 | GNUNET_SCHEDULER_add_now (&do_error, handle); | ||
734 | return; | ||
735 | } | ||
738 | 736 | ||
739 | for (ego_entry = handle->ego_head; NULL != ego_entry; | 737 | for (ego_entry = handle->ego_head; NULL != ego_entry; |
740 | ego_entry = ego_entry->next) { | 738 | ego_entry = ego_entry->next) { |