summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_reserves_get_attestable.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-06-04 13:26:00 +0200
committerChristian Grothoff <christian@grothoff.org>2023-06-04 13:26:00 +0200
commit809300158caaa0215c36ef89c7e38f0edfa93593 (patch)
tree1faf7e314af34db7a2333d8003ee0ed6fca91d74 /src/lib/exchange_api_reserves_get_attestable.c
parent9718bc4920ab4781378b777bf3e2af275c8d0575 (diff)
downloadexchange-809300158caaa0215c36ef89c7e38f0edfa93593.tar.gz
exchange-809300158caaa0215c36ef89c7e38f0edfa93593.tar.bz2
exchange-809300158caaa0215c36ef89c7e38f0edfa93593.zip
code cleanup, fixing misc. memory leaks in the process
Diffstat (limited to 'src/lib/exchange_api_reserves_get_attestable.c')
-rw-r--r--src/lib/exchange_api_reserves_get_attestable.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/exchange_api_reserves_get_attestable.c b/src/lib/exchange_api_reserves_get_attestable.c
index 3a5fd25d8..b272d478a 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;
}