commit 25c86ad506c7040602c2887c8b1a3eb8c234d6c2
parent 38bd2746822c33ea6e69d33861d4a467a50425d1
Author: Christian Grothoff <christian@grothoff.org>
Date: Wed, 23 Sep 2015 14:54:05 +0200
simplify logic
Diffstat:
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/mint/taler-mint-httpd_admin.c b/src/mint/taler-mint-httpd_admin.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2014 GNUnet e.V.
+ Copyright (C) 2014, 2015 GNUnet e.V.
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License as published by the Free Software
@@ -136,9 +136,9 @@ TMH_ADMIN_handler_admin_add_incoming (struct TMH_RequestHandler *rh,
res = TMH_PARSE_json_data (connection,
root,
spec);
+ json_decref (root);
if (GNUNET_OK != res)
{
- json_decref (root);
return (GNUNET_SYSERR == res) ? MHD_NO : MHD_YES;
}
if (GNUNET_YES !=
@@ -146,7 +146,6 @@ TMH_ADMIN_handler_admin_add_incoming (struct TMH_RequestHandler *rh,
wire))
{
TMH_PARSE_release_data (spec);
- json_decref (root);
return TMH_RESPONSE_reply_arg_unknown (connection,
"wire");
}
@@ -156,7 +155,6 @@ TMH_ADMIN_handler_admin_add_incoming (struct TMH_RequestHandler *rh,
at,
wire);
TMH_PARSE_release_data (spec);
- json_decref (root);
return res;
}