diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2024-01-12 11:56:55 +0100 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2024-01-12 11:56:55 +0100 |
commit | a6b35ee7d345aa11e0388733fb95f3a4d2e52180 (patch) | |
tree | 6b33d6265092df3d2bc92b82bfa83f71e2863979 /src/lib/exchange_api_age_withdraw_reveal.c | |
parent | 395a4c5fef631274f6cd13be697ef62ebc49546a (diff) | |
download | exchange-a6b35ee7d345aa11e0388733fb95f3a4d2e52180.tar.gz exchange-a6b35ee7d345aa11e0388733fb95f3a4d2e52180.tar.bz2 exchange-a6b35ee7d345aa11e0388733fb95f3a4d2e52180.zip |
fixes for #8069, #8070 and #8072
- TALER_coin_ev_hash function now returns void
- double free fixes
- FAIL_IF logic fixes
Diffstat (limited to 'src/lib/exchange_api_age_withdraw_reveal.c')
-rw-r--r-- | src/lib/exchange_api_age_withdraw_reveal.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/lib/exchange_api_age_withdraw_reveal.c b/src/lib/exchange_api_age_withdraw_reveal.c index a448d109d..cade528d2 100644 --- a/src/lib/exchange_api_age_withdraw_reveal.c +++ b/src/lib/exchange_api_age_withdraw_reveal.c @@ -57,7 +57,7 @@ struct TALER_EXCHANGE_AgeWithdrawRevealHandle const struct TALER_EXCHANGE_AgeWithdrawCoinInput *coins_input; /* The url for the reveal request */ - const char *request_url; + char *request_url; /** * CURL handle for the request job. @@ -146,6 +146,9 @@ age_withdraw_reveal_ok ( &response); /* Make sure the callback isn't called again */ awrh->callback = NULL; + /* Free resources */ + for (size_t i = 0; i < awrh->num_coins; i++) + TALER_blinded_denom_sig_free (&denom_sigs[i]); } return GNUNET_OK; @@ -340,13 +343,13 @@ perform_protocol ( json_t *j_sec = NULL; #define FAIL_IF(cond) \ - do { \ - if ((cond)) \ - { \ - GNUNET_break (! (cond)); \ - goto ERROR; \ - } \ - } while(0) + do { \ + if ((cond)) \ + { \ + GNUNET_break (! (cond)); \ + goto ERROR; \ + } \ + } while (0) j_array_of_secrets = json_array (); FAIL_IF (NULL == j_array_of_secrets); @@ -463,7 +466,10 @@ TALER_EXCHANGE_age_withdraw_reveal_cancel ( awrh->job = NULL; } TALER_curl_easy_post_finished (&awrh->post_ctx); - /* FIXME[oec]: anything else left to cleanup!? */ + + if (NULL != awrh->request_url) + GNUNET_free (awrh->request_url); + GNUNET_free (awrh); } |