View Issue Details

IDProjectCategoryView StatusLast Update
0008088Talerexchangepublic2024-03-07 20:47
Reporterfefe Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.9.4Fixed in Version0.9.4 
Summary0008088: TALER_EXCHANGE_batch_deposit: memory leak in error case
DescriptionThis is in exchange/src/lib/exchange_api_batch_deposit.c:

511 json_t *deposits;

542 deposits = json_array ();

556 if (NULL == dki)
557 {
558 *ec = TALER_EC_EXCHANGE_GENERIC_DENOMINATION_KEY_UNKNOWN;
559 GNUNET_break_op (0);
560 return NULL;
561 }

This return statement leaks deposits.

562 if (0 >
563 TALER_amount_subtract (&amount_without_fee,
564 &cdd->amount,
565 &dki->fees.deposit))
566 {
567 *ec = TALER_EC_EXCHANGE_DEPOSIT_FEE_ABOVE_AMOUNT;
568 GNUNET_break_op (0);
569 GNUNET_free (dh->cdds);
570 GNUNET_free (dh);
571 return NULL;
572 }

This one, too.

577 if (GNUNET_OK !=
578 TALER_EXCHANGE_verify_deposit_signature_ (dcd,
579 &dh->h_policy,
580 &dh->h_wire,
581 cdd,
582 dki))
583 {
584 *ec = TALER_EC_EXCHANGE_DEPOSIT_COIN_SIGNATURE_INVALID;
585 GNUNET_break_op (0);
586 GNUNET_free (dh->cdds);
587 GNUNET_free (dh);
588 return NULL;
589 }

As does this one.

614 dh->url = TALER_url_join (url,
615 "batch-deposit",
616 NULL);
617 if (NULL == dh->url)
618 {
619 GNUNET_break (0);
620 *ec = TALER_EC_GENERIC_ALLOCATION_FAILURE;
621 GNUNET_free (dh->url);
622 GNUNET_free (dh->cdds);
623 GNUNET_free (dh);
624 return NULL;
625 }

This one as well.
TagsNo tags attached.

Relationships

child of 0008112 assignedfefe Merchant security review 

Activities

Christian Grothoff

2024-01-15 16:14

manager   ~0020875

Fixed in Git 6c14000443996dac6389874ce2f7aebda3e37bf6.

Issue History

Date Modified Username Field Change
2024-01-15 15:55 fefe New Issue
2024-01-15 15:55 fefe Status new => assigned
2024-01-15 15:55 fefe Assigned To => Christian Grothoff
2024-01-15 16:14 Christian Grothoff Status assigned => resolved
2024-01-15 16:14 Christian Grothoff Resolution open => fixed
2024-01-15 16:14 Christian Grothoff Fixed in Version => 0.9.4
2024-01-15 16:14 Christian Grothoff Note Added: 0020875
2024-01-15 16:14 Christian Grothoff Product Version => git (master)
2024-01-15 16:14 Christian Grothoff Target Version => 0.9.4
2024-01-18 23:32 Christian Grothoff Relationship added child of 0008112
2024-03-07 20:47 Christian Grothoff Status resolved => closed