merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 44edf7ea7f488ad0548c73e9f7f39ae0ed570330
parent 3b472ed491ac8ce5c58a55f1ca40d31d1a093413
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 30 Aug 2025 23:58:19 +0200

-fix memory leak

Diffstat:
Msrc/backend/taler-merchant-httpd_private-post-orders.c | 13+++++--------
1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c @@ -3342,14 +3342,14 @@ phase_merge_inventory (struct OrderContext *oc) pd.product_name), GNUNET_JSON_pack_string ("description", pd.description), - GNUNET_JSON_pack_object_steal ("description_i18n", - pd.description_i18n), + GNUNET_JSON_pack_object_incref ("description_i18n", + pd.description_i18n), GNUNET_JSON_pack_string ("unit", pd.unit), TALER_JSON_pack_amount ("price", &pd.price), - GNUNET_JSON_pack_array_steal ("taxes", - pd.taxes), + GNUNET_JSON_pack_array_incref ("taxes", + pd.taxes), GNUNET_JSON_pack_string ("image", pd.image), GNUNET_JSON_pack_uint64 ( @@ -3360,10 +3360,7 @@ phase_merge_inventory (struct OrderContext *oc) json_array_append_new (oc->merge_inventory.products, p)); } - GNUNET_free (pd.description); - GNUNET_free (pd.unit); - GNUNET_free (pd.image); - json_decref (pd.address); + TALER_MERCHANTDB_product_details_free (&pd); } } /* check if final product list is well-formed */