From 809300158caaa0215c36ef89c7e38f0edfa93593 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 4 Jun 2023 13:26:00 +0200 Subject: code cleanup, fixing misc. memory leaks in the process --- src/lib/exchange_api_reserves_get_attestable.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/lib/exchange_api_reserves_get_attestable.c') diff --git a/src/lib/exchange_api_reserves_get_attestable.c b/src/lib/exchange_api_reserves_get_attestable.c index 3a5fd25d..b272d478 100644 --- a/src/lib/exchange_api_reserves_get_attestable.c +++ b/src/lib/exchange_api_reserves_get_attestable.c @@ -88,10 +88,10 @@ handle_reserves_get_attestable_ok ( .hr.reply = j, .hr.http_status = MHD_HTTP_OK }; - json_t *details; + const json_t *details; struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_json ("details", - &details), + GNUNET_JSON_spec_array_const ("details", + &details), GNUNET_JSON_spec_end () }; @@ -116,7 +116,6 @@ handle_reserves_get_attestable_ok ( if (NULL == attributes[i]) { GNUNET_break_op (0); - GNUNET_JSON_parse_free (spec); return GNUNET_SYSERR; } } @@ -126,7 +125,6 @@ handle_reserves_get_attestable_ok ( &rs); rgah->cb = NULL; } - GNUNET_JSON_parse_free (spec); return GNUNET_OK; } -- cgit v1.2.3