[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: -fix leaks
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: -fix leaks |
Date: |
Fri, 08 Jul 2022 14:29:55 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new a95379df -fix leaks
a95379df is described below
commit a95379df0fd685123f035fe2dd68eab24fdab52f
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Fri Jul 8 14:29:53 2022 +0200
-fix leaks
---
.../taler-merchant-httpd_private-post-orders.c | 35 +++++++++++++++-------
1 file changed, 25 insertions(+), 10 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c
b/src/backend/taler-merchant-httpd_private-post-orders.c
index efaaf5a7..22dded0b 100644
--- a/src/backend/taler-merchant-httpd_private-post-orders.c
+++ b/src/backend/taler-merchant-httpd_private-post-orders.c
@@ -766,6 +766,7 @@ patch_order (struct MHD_Connection *connection,
tm_info = localtime (&timer);
if (NULL == tm_info)
{
+ GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (
connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
@@ -816,8 +817,8 @@ patch_order (struct MHD_Connection *connection,
if (strstr (pos + strlen ("${ORDER_ID}"),
"${ORDER_ID}"))
{
- /* FIXME: free anything? */
GNUNET_break_op (0);
+ GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_GENERIC_PARAMETER_MALFORMED,
@@ -882,6 +883,7 @@ patch_order (struct MHD_Connection *connection,
now)) )
{
GNUNET_break_op (0);
+ GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (
connection,
MHD_HTTP_BAD_REQUEST,
@@ -913,6 +915,7 @@ patch_order (struct MHD_Connection *connection,
if (GNUNET_TIME_absolute_is_never (wire_deadline.abs_time))
{
GNUNET_break_op (0);
+ GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (
connection,
MHD_HTTP_BAD_REQUEST,
@@ -931,6 +934,7 @@ patch_order (struct MHD_Connection *connection,
refund_deadline))
{
GNUNET_break_op (0);
+ GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (
connection,
MHD_HTTP_BAD_REQUEST,
@@ -985,6 +989,7 @@ patch_order (struct MHD_Connection *connection,
('/' != merchant_base_url[strlen (merchant_base_url) - 1]))
{
GNUNET_break_op (0);
+ GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (
connection,
MHD_HTTP_BAD_REQUEST,
@@ -996,6 +1001,7 @@ patch_order (struct MHD_Connection *connection,
if (NULL != jmerchant)
{
GNUNET_break_op (0);
+ GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (
connection,
MHD_HTTP_BAD_REQUEST,
@@ -1065,6 +1071,7 @@ patch_order (struct MHD_Connection *connection,
if (GNUNET_OK !=
TALER_JSON_contract_seed_forgettable (order))
{
+ GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (
connection,
MHD_HTTP_BAD_REQUEST,
@@ -1092,12 +1099,14 @@ patch_order (struct MHD_Connection *connection,
{
case GNUNET_SYSERR:
GNUNET_break (0);
+ GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (
connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_GENERIC_FAILED_COMPUTE_JSON_HASH,
"could not compute hash of patched order");
case GNUNET_NO:
+ GNUNET_JSON_parse_free (spec);
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (
connection,
@@ -1108,15 +1117,21 @@ patch_order (struct MHD_Connection *connection,
break;
}
}
- return execute_order (connection,
- hc,
- h_post_data,
- order,
- claim_token,
- inventory_products_length,
- inventory_products,
- uuids_length,
- uuids);
+ {
+ MHD_RESULT mres;
+
+ mres = execute_order (connection,
+ hc,
+ h_post_data,
+ order,
+ claim_token,
+ inventory_products_length,
+ inventory_products,
+ uuids_length,
+ uuids);
+ GNUNET_JSON_parse_free (spec);
+ return mres;
+ }
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: -fix leaks,
gnunet <=