View Issue Details

IDProjectCategoryView StatusLast Update
0008070Talerexchangepublic2024-03-07 20:49
Reporterfefe Assigned Tooec  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Target Version0.9.4Fixed in Version0.9.4 
Summary0008070: perform_protocol: leaks hash context
DescriptionThis is in exchange/src/lib/exchange_api_age_withdraw.c:

   511 struct GNUNET_HashContext *coins_hctx;

   545 coins_hctx = GNUNET_CRYPTO_hash_context_start ();
   546 FAIL_IF (NULL == coins_hctx);

Internally, this allocates a context and calls gcry_md_open on stuff in it.

   596 GNUNET_CRYPTO_hash_context_read (coins_hctx,
   597 &bch,
   598 sizeof(bch));
   599 }
   600
   601 FAIL_IF (0 < json_array_append_new (j_array_candidates,
   602 j_can));

Aside from the fail condition being wrong here (see other bug) this is supposed to do a goto FAIL, in which case coins_hctx leaks.
After FAIL: add a GNUNET_CRYPTO_hash_context_abort(coins_hctx).
TagsNo tags attached.

Activities

oec

2024-01-12 11:59

developer   ~0020870

Fixed with a6b35ee7d345aa11e0388733fb95f3a4d2e52180

Issue History

Date Modified Username Field Change
2024-01-11 17:15 fefe New Issue
2024-01-11 17:15 fefe Status new => assigned
2024-01-11 17:15 fefe Assigned To => Christian Grothoff
2024-01-11 17:17 oec Assigned To Christian Grothoff => oec
2024-01-12 11:59 oec Status assigned => resolved
2024-01-12 11:59 oec Resolution open => fixed
2024-01-12 11:59 oec Fixed in Version => git (master)
2024-01-12 11:59 oec Note Added: 0020870
2024-01-25 22:29 Christian Grothoff Fixed in Version git (master) => 0.9.4
2024-01-25 22:29 Christian Grothoff Target Version => 0.9.4
2024-03-07 20:49 Christian Grothoff Status resolved => closed