View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008088 | Taler | exchange | public | 2024-01-15 15:55 | 2024-03-07 20:47 |
Reporter | fefe | Assigned To | Christian Grothoff | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | ||
Product Version | git (master) | ||||
Target Version | 0.9.4 | Fixed in Version | 0.9.4 | ||
Summary | 0008088: TALER_EXCHANGE_batch_deposit: memory leak in error case | ||||
Description | This 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. | ||||
Tags | No tags attached. | ||||
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 |