diff options
Diffstat (limited to 'src/credential/plugin_rest_credential.c')
-rw-r--r-- | src/credential/plugin_rest_credential.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/credential/plugin_rest_credential.c b/src/credential/plugin_rest_credential.c index 480658822..2e43139de 100644 --- a/src/credential/plugin_rest_credential.c +++ b/src/credential/plugin_rest_credential.c | |||
@@ -617,7 +617,6 @@ collect_cred_cont (struct GNUNET_REST_RequestHandle *conndata_handle, | |||
617 | { | 617 | { |
618 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 618 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
619 | "Missing subject\n"); | 619 | "Missing subject\n"); |
620 | GNUNET_free (entity_attr); | ||
621 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 620 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
622 | return; | 621 | return; |
623 | } | 622 | } |
@@ -627,7 +626,6 @@ collect_cred_cont (struct GNUNET_REST_RequestHandle *conndata_handle, | |||
627 | { | 626 | { |
628 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 627 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
629 | "Malformed subject\n"); | 628 | "Malformed subject\n"); |
630 | GNUNET_free (entity_attr); | ||
631 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 629 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
632 | return; | 630 | return; |
633 | } | 631 | } |
@@ -728,7 +726,6 @@ verify_cred_cont (struct GNUNET_REST_RequestHandle *conndata_handle, | |||
728 | { | 726 | { |
729 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 727 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
730 | "Missing subject key\n"); | 728 | "Missing subject key\n"); |
731 | GNUNET_free (entity_attr); | ||
732 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 729 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
733 | return; | 730 | return; |
734 | } | 731 | } |
@@ -738,7 +735,6 @@ verify_cred_cont (struct GNUNET_REST_RequestHandle *conndata_handle, | |||
738 | { | 735 | { |
739 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 736 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
740 | "Malformed subject\n"); | 737 | "Malformed subject\n"); |
741 | GNUNET_free (entity_attr); | ||
742 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 738 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
743 | return; | 739 | return; |
744 | } | 740 | } |
@@ -748,7 +744,6 @@ verify_cred_cont (struct GNUNET_REST_RequestHandle *conndata_handle, | |||
748 | &handle->subject_key)) { | 744 | &handle->subject_key)) { |
749 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 745 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
750 | "Malformed subject key\n"); | 746 | "Malformed subject key\n"); |
751 | GNUNET_free (entity_attr); | ||
752 | GNUNET_SCHEDULER_add_now (&do_error, handle); | 747 | GNUNET_SCHEDULER_add_now (&do_error, handle); |
753 | return; | 748 | return; |
754 | } | 749 | } |
@@ -858,6 +853,7 @@ send_cred_response (struct RequestHandle *handle, | |||
858 | { | 853 | { |
859 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 854 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
860 | "Subject malformed\n"); | 855 | "Subject malformed\n"); |
856 | GNUNET_free (issuer); | ||
861 | return; | 857 | return; |
862 | } | 858 | } |
863 | GNUNET_asprintf (&id, | 859 | GNUNET_asprintf (&id, |
@@ -869,6 +865,8 @@ send_cred_response (struct RequestHandle *handle, | |||
869 | { | 865 | { |
870 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | 866 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, |
871 | "Subject malformed\n"); | 867 | "Subject malformed\n"); |
868 | GNUNET_free (id); | ||
869 | GNUNET_free (issuer); | ||
872 | return; | 870 | return; |
873 | } | 871 | } |
874 | GNUNET_STRINGS_base64_encode ((char*)&cred->signature, | 872 | GNUNET_STRINGS_base64_encode ((char*)&cred->signature, |
@@ -953,6 +951,14 @@ get_cred_issuer_cb (void *cls, | |||
953 | } | 951 | } |
954 | expiration_str = GNUNET_CONTAINER_multihashmap_get (handle->rest_handle->url_param_map, | 952 | expiration_str = GNUNET_CONTAINER_multihashmap_get (handle->rest_handle->url_param_map, |
955 | &key); | 953 | &key); |
954 | if ( NULL == expiration_str ) | ||
955 | { | ||
956 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
957 | "Expiration malformed\n"); | ||
958 | GNUNET_SCHEDULER_add_now (&do_error, handle); | ||
959 | return; | ||
960 | } | ||
961 | |||
956 | if (GNUNET_OK == GNUNET_STRINGS_fancy_time_to_relative (expiration_str, | 962 | if (GNUNET_OK == GNUNET_STRINGS_fancy_time_to_relative (expiration_str, |
957 | &etime_rel)) | 963 | &etime_rel)) |
958 | { | 964 | { |