commit e7ca4d8bf0eefc015b776c0c7678eda1656bef86
parent 2dcdfb373db7dd9599761bdd8f3bfc00e4263055
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Thu, 16 Jul 2026 02:04:52 +0200
fix leaks
Diffstat:
3 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_post-reports-REPORT_ID.c b/src/backend/taler-merchant-httpd_post-reports-REPORT_ID.c
@@ -117,6 +117,8 @@ TMH_post_reports_ID (
before this process was able to process the notification
about the new instance. Wild. */
GNUNET_break (0);
+ GNUNET_free (instance_id);
+ GNUNET_free (data_source);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_NOT_FOUND,
TALER_EC_MERCHANT_GENERIC_REPORT_UNKNOWN,
@@ -179,7 +181,11 @@ TMH_post_reports_ID (
instance_id),
&is_public);
if (GNUNET_OK != ret)
+ {
+ GNUNET_free (instance_id);
+ GNUNET_free (data_source);
return (GNUNET_NO == ret) ? MHD_YES : MHD_NO;
+ }
GNUNET_break (NULL != hc->rh);
}
GNUNET_free (instance_id);
diff --git a/src/lib/merchant_api_get-private-orders-ORDER_ID.c b/src/lib/merchant_api_get-private-orders-ORDER_ID.c
@@ -314,6 +314,9 @@ handle_paid (struct TALER_MERCHANT_GetPrivateOrderHandle *oph,
struct TALER_MERCHANT_GetPrivateOrderRefundDetail ref[
GNUNET_NZL (ref_len)];
+ memset (wts,
+ 0,
+ sizeof (wts));
for (unsigned int i = 0; i<wts_len; i++)
{
struct TALER_MERCHANT_WireTransfer *wt = &wts[i];
diff --git a/src/lib/merchant_api_get-private-transfers.c b/src/lib/merchant_api_get-private-transfers.c
@@ -136,6 +136,9 @@ parse_transfers (
size_t index;
json_t *value;
+ memset (tds,
+ 0,
+ sizeof (tds));
json_array_foreach (transfers_arr, index, value) {
struct TALER_MERCHANT_GetPrivateTransfersTransferData *td = &tds[index];
struct GNUNET_JSON_Specification ispec[] = {