commit ce384765f5457233f3b46e48fe77c339cc5784c1
parent 034765718ee18166f634ba7dc996a159f82e76a6
Author: Jonathan Buchanan <jonathan.russ.buchanan@gmail.com>
Date: Thu, 30 Jul 2020 17:48:04 -0400
fix error message use-after-free
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_private-get-orders.c b/src/backend/taler-merchant-httpd_private-get-orders.c
@@ -619,14 +619,17 @@ TMH_private_get_orders (const struct TMH_RequestHandler *rh,
if ((0 > qs) ||
(0 != aos->result))
{
+ int aos_result = aos->result;
+ const char *aos_ec_msg = aos->ec_msg;
+
GNUNET_break (0);
json_decref (aos->pa);
GNUNET_free (aos);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_ORDERS_GET_DB_LOOKUP_ERROR,
- 0 != aos->result ?
- aos->ec_msg :
+ 0 != aos_result ?
+ aos_ec_msg :
"failed to lookup orders in database");
}
}