commit 2bf1a8f751ed91a31d9fc88d93cf558b1233a177
parent 9704be7f84b6471aa3ccae715a53783f411a03e5
Author: Christian Grothoff <grothoff@gnunet.org>
Date: Sat, 11 Jul 2026 17:50:47 +0200
fix leaks/error reporting
Diffstat:
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c
@@ -1920,6 +1920,12 @@ purse_refund_coin_cb (
qs = TALER_ARL_get_denomination_info (denom_pub,
&issue,
NULL);
+ if (0 > qs)
+ {
+ GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
+ cc->qs = GNUNET_DB_STATUS_HARD_ERROR;
+ return GNUNET_SYSERR;
+ }
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
{
qs = report_row_inconsistency ("purse-refunds",
@@ -1933,11 +1939,6 @@ purse_refund_coin_cb (
}
return GNUNET_OK;
}
- if (GNUNET_DB_STATUS_SUCCESS_ONE_RESULT != qs)
- {
- GNUNET_break (GNUNET_DB_STATUS_SOFT_ERROR == qs);
- return GNUNET_SYSERR;
- }
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"Aborted purse-deposit of coin %s in denomination `%s' value %s\n",
TALER_B2S (coin_pub),
diff --git a/src/exchangedb/exchangedb_accounts.c b/src/exchangedb/exchangedb_accounts.c
@@ -209,9 +209,7 @@ add_account_cb (void *cls,
return;
}
full_payto.full_payto = payto_uri;
- method = TALER_payto_get_method (payto_uri);
- if ( (NULL != (err = TALER_payto_validate (full_payto))) ||
- (NULL == method) )
+ if (NULL != (err = TALER_payto_validate (full_payto)))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"payto URI in config ([%s]/PAYTO_URI) malformed: %s\n",
@@ -222,7 +220,15 @@ add_account_cb (void *cls,
GNUNET_free (err);
return;
}
- GNUNET_assert (NULL != method);
+ if (NULL == (method = TALER_payto_get_method (payto_uri)))
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "payto URI in config ([%s]/PAYTO_URI) malformed: no method!?\n",
+ section);
+ lc->res = GNUNET_SYSERR;
+ GNUNET_free (payto_uri);
+ return;
+ }
wa = GNUNET_new (struct WireAccount);
wa->section_name = GNUNET_strdup (section);
wa->payto_uri = full_payto;