summaryrefslogtreecommitdiff
path: root/src/mint
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-09-22 16:54:04 +0200
committerChristian Grothoff <christian@grothoff.org>2015-09-22 16:54:04 +0200
commit38bd2746822c33ea6e69d33861d4a467a50425d1 (patch)
tree6d3685dc9b1297fac6b262fad45dbf9f94e44a49 /src/mint
parente62fd9d6547255c472c233cf74cef412fa0c7a9e (diff)
downloadexchange-38bd2746822c33ea6e69d33861d4a467a50425d1.tar.gz
exchange-38bd2746822c33ea6e69d33861d4a467a50425d1.tar.bz2
exchange-38bd2746822c33ea6e69d33861d4a467a50425d1.zip
fix leak
Diffstat (limited to 'src/mint')
-rw-r--r--src/mint/taler-mint-httpd_parsing.c39
1 files changed, 18 insertions, 21 deletions
diff --git a/src/mint/taler-mint-httpd_parsing.c b/src/mint/taler-mint-httpd_parsing.c
index 389c0eed1..365202905 100644
--- a/src/mint/taler-mint-httpd_parsing.c
+++ b/src/mint/taler-mint-httpd_parsing.c
@@ -805,19 +805,16 @@ TMH_PARSE_navigate_json (struct MHD_Connection *connection,
TMH_mint_currency_string))
{
GNUNET_break_op (0);
- if (MHD_YES !=
- TMH_RESPONSE_reply_json_pack (connection,
- MHD_HTTP_BAD_REQUEST,
- "{s:s, s:O, s:s}",
- "error", "Currency not supported",
- "path", path,
- "currency", where->currency))
- {
- memset (where, 0, sizeof (struct TALER_Amount));
- return GNUNET_SYSERR;
- }
+ ret = (MHD_YES !=
+ TMH_RESPONSE_reply_json_pack (connection,
+ MHD_HTTP_BAD_REQUEST,
+ "{s:s, s:O, s:s}",
+ "error", "Currency not supported",
+ "path", path,
+ "currency", where->currency))
+ ? GNUNET_SYSERR : GNUNET_NO;
memset (where, 0, sizeof (struct TALER_Amount));
- return GNUNET_NO;
+ break;
}
ret = GNUNET_OK;
break;
@@ -832,15 +829,15 @@ TMH_PARSE_navigate_json (struct MHD_Connection *connection,
where))
{
GNUNET_break_op (0);
- if (MHD_YES !=
- TMH_RESPONSE_reply_json_pack (connection,
- MHD_HTTP_BAD_REQUEST,
- "{s:s, s:s, s:O}",
- "error", "Bad format",
- "hint", "expected absolute time",
- "path", path))
- return GNUNET_SYSERR;
- return GNUNET_NO;
+ ret = (MHD_YES !=
+ TMH_RESPONSE_reply_json_pack (connection,
+ MHD_HTTP_BAD_REQUEST,
+ "{s:s, s:s, s:O}",
+ "error", "Bad format",
+ "hint", "expected absolute time",
+ "path", path))
+ ? GNUNET_SYSERR : GNUNET_NO;
+ break;
}
ret = GNUNET_OK;
break;