[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: free after idempotency check
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: free after idempotency check |
Date: |
Wed, 17 Mar 2021 23:59:06 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new f4acd53 free after idempotency check
f4acd53 is described below
commit f4acd5398da39b93e16d7f39938369950642d2a9
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Wed Mar 17 23:59:02 2021 +0100
free after idempotency check
---
src/backend/anastasis-httpd_truth_upload.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/backend/anastasis-httpd_truth_upload.c
b/src/backend/anastasis-httpd_truth_upload.c
index 7e36438..3dcee59 100644
--- a/src/backend/anastasis-httpd_truth_upload.c
+++ b/src/backend/anastasis-httpd_truth_upload.c
@@ -647,13 +647,13 @@ AH_handler_truth_post (
encrypted_truth_size,
type,
AH_truth_expiration);
- json_decref (json);
- GNUNET_JSON_parse_free (spec);
switch (qs)
{
case GNUNET_DB_STATUS_HARD_ERROR:
case GNUNET_DB_STATUS_SOFT_ERROR:
GNUNET_break (0);
+ json_decref (json);
+ GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_GENERIC_DB_INVARIANT_FAILURE,
@@ -687,16 +687,23 @@ AH_handler_truth_post (
GNUNET_free (xmethod);
}
if (! ok)
+ {
+ json_decref (json);
+ GNUNET_JSON_parse_free (spec);
+
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_CONFLICT,
TALER_EC_ANASTASIS_TRUTH_UPLOAD_UUID_EXISTS,
NULL);
+ }
/* idempotency detected, intentional fall through! */
}
case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
{
struct MHD_Response *resp;
+ json_decref (json);
+ GNUNET_JSON_parse_free (spec);
resp = MHD_create_response_from_buffer (0,
NULL,
MHD_RESPMEM_PERSISTENT);
@@ -709,6 +716,8 @@ AH_handler_truth_post (
return ret;
}
}
+ json_decref (json);
+ GNUNET_JSON_parse_free (spec);
GNUNET_break (0);
return MHD_NO;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis] branch master updated: free after idempotency check,
gnunet <=