diff options
author | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-06-05 13:24:15 +0200 |
---|---|---|
committer | Schanzenbach, Martin <mschanzenbach@posteo.de> | 2019-06-05 13:24:15 +0200 |
commit | a39f6df40cf8bf89cf714580886414831ba9f68a (patch) | |
tree | 4c7bba31d34a3fae7dcd0f0d1a11d2b83db61b61 | |
parent | fc1a8c08ef0235addf518e45dd26c8980288a8e2 (diff) | |
download | gnunet-a39f6df40cf8bf89cf714580886414831ba9f68a.tar.gz gnunet-a39f6df40cf8bf89cf714580886414831ba9f68a.zip |
minor fixes
-rw-r--r-- | src/reclaim/plugin_rest_reclaim.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/reclaim/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c index 1efd1f9ea..18309e68c 100644 --- a/src/reclaim/plugin_rest_reclaim.c +++ b/src/reclaim/plugin_rest_reclaim.c | |||
@@ -755,7 +755,7 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
755 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity_priv; | 755 | const struct GNUNET_CRYPTO_EcdsaPrivateKey *identity_priv; |
756 | struct RequestHandle *handle = cls; | 756 | struct RequestHandle *handle = cls; |
757 | struct EgoEntry *ego_entry; | 757 | struct EgoEntry *ego_entry; |
758 | struct GNUNET_RECLAIM_Ticket *ticket; | 758 | struct GNUNET_RECLAIM_Ticket *ticket = NULL; |
759 | struct GNUNET_CRYPTO_EcdsaPublicKey tmp_pk; | 759 | struct GNUNET_CRYPTO_EcdsaPublicKey tmp_pk; |
760 | char term_data[handle->rest_handle->data_size + 1]; | 760 | char term_data[handle->rest_handle->data_size + 1]; |
761 | json_t *data_json; | 761 | json_t *data_json; |
@@ -774,12 +774,14 @@ revoke_ticket_cont (struct GNUNET_REST_RequestHandle *con_handle, | |||
774 | handle->rest_handle->data, | 774 | handle->rest_handle->data, |
775 | handle->rest_handle->data_size); | 775 | handle->rest_handle->data_size); |
776 | data_json = json_loads (term_data, JSON_DECODE_ANY, &err); | 776 | data_json = json_loads (term_data, JSON_DECODE_ANY, &err); |
777 | if (GNUNET_OK != GNUNET_JSON_parse (data_json, tktspec, NULL, NULL)) | 777 | if ((NULL == data_json) || |
778 | (GNUNET_OK != GNUNET_JSON_parse (data_json, tktspec, NULL, NULL))) | ||
778 | { | 779 | { |
779 | handle->emsg = GNUNET_strdup ("Not a ticket!\n"); | 780 | handle->emsg = GNUNET_strdup ("Not a ticket!\n"); |
780 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 781 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
781 | GNUNET_JSON_parse_free (tktspec); | 782 | GNUNET_JSON_parse_free (tktspec); |
782 | json_decref (data_json); | 783 | if (NULL != data_json) |
784 | json_decref (data_json); | ||
783 | return; | 785 | return; |
784 | } | 786 | } |
785 | json_decref (data_json); | 787 | json_decref (data_json); |