commit b49592ea394be1b690b85e085749b88840b8af06
parent 8f9f0bbc10e3a5aa211d8448a72bad2007f65bf6
Author: Christian Grothoff <christian@grothoff.org>
Date: Mon, 29 Jun 2026 00:33:12 +0200
fix crash issues
Diffstat:
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c
@@ -1560,6 +1560,8 @@ process_pay_with_keys (
NULL);
return;
}
+ if (NULL != eg->keys)
+ TALER_EXCHANGE_keys_decref (eg->keys);
eg->keys = TALER_EXCHANGE_keys_incref (keys);
if (! TMH_EXCHANGES_is_below_limit (keys,
TALER_KYCLOGIC_KYC_TRIGGER_TRANSACTION,
@@ -2089,6 +2091,7 @@ phase_final_output_token_processing (struct PayContext *pc)
case GNUNET_DB_STATUS_HARD_ERROR:
TALER_MERCHANTDB_rollback (TMH_db);
GNUNET_break (0);
+ pc->phase++;
return;
case GNUNET_DB_STATUS_SOFT_ERROR:
TALER_MERCHANTDB_rollback (TMH_db);
@@ -4652,10 +4655,11 @@ phase_check_contract (struct PayContext *pc)
struct TMH_WireMethod *wm;
wm = pc->hc->instance->wm_head;
- while (0 !=
- GNUNET_memcmp (
- &pc->check_contract.contract_terms->pc->h_wire,
- &wm->h_wire))
+ while ( (NULL != wm) &&
+ (0 !=
+ GNUNET_memcmp (
+ &pc->check_contract.contract_terms->pc->h_wire,
+ &wm->h_wire)) )
wm = wm->next;
if (NULL == wm)
{