commit ef2e5cb7bcec3d6972457567fb4528f740ddda4c
parent 7234611952e153165c1a94da6d98a288dd1041dc
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 31 Jan 2026 15:50:39 +0100
fix #10954
Diffstat:
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_private-get-orders-ID.c b/src/backend/taler-merchant-httpd_private-get-orders-ID.c
@@ -1488,6 +1488,9 @@ phase_check_local_transfers (struct GetOrderRequestContext *gorc)
TALER_amount_set_zero (gorc->contract_amount.currency,
&gorc->deposit_fees_total));
GNUNET_assert (NULL != gorc->wire_details);
+ /* We may be running again due to long-polling, clear state first */
+ json_array_clear (gorc->wire_details);
+ json_array_clear (gorc->refund_details);
qs = TMH_db->lookup_transfer_details_by_order (TMH_db->cls,
gorc->order_serial,
&process_transfer_details,
@@ -1641,10 +1644,10 @@ phase_reply_result (struct GetOrderRequestContext *gorc)
GNUNET_JSON_pack_allow_null (
TALER_JSON_pack_amount ("refund_amount",
&gorc->refund_amount)),
- GNUNET_JSON_pack_array_steal ("wire_details",
- gorc->wire_details),
- GNUNET_JSON_pack_array_steal ("refund_details",
- gorc->refund_details),
+ GNUNET_JSON_pack_array_incref ("wire_details",
+ gorc->wire_details),
+ GNUNET_JSON_pack_array_incref ("refund_details",
+ gorc->refund_details),
GNUNET_JSON_pack_string ("order_status_url",
order_status_url),
(gorc->choice_index >= 0)
@@ -1656,8 +1659,6 @@ phase_reply_result (struct GetOrderRequestContext *gorc)
json_decref (reply);
}
GNUNET_free (order_status_url);
- gorc->wire_details = NULL;
- gorc->refund_details = NULL;
}