From b3ddcd0dbb6cf0db09f7bd156d73b3cb8e284e2d Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 27 Aug 2021 14:58:46 +0200 Subject: -fix misc. memory leaks --- src/authorization/anastasis_authorization_plugin_iban.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/authorization/anastasis_authorization_plugin_iban.c') diff --git a/src/authorization/anastasis_authorization_plugin_iban.c b/src/authorization/anastasis_authorization_plugin_iban.c index e70bfdd..62b1500 100644 --- a/src/authorization/anastasis_authorization_plugin_iban.c +++ b/src/authorization/anastasis_authorization_plugin_iban.c @@ -161,8 +161,10 @@ get_message (const json_t *messages, NULL, NULL)) { GNUNET_break (0); + GNUNET_JSON_parse_free (spec); return NULL; } + GNUNET_JSON_parse_free (spec); return ret; } } @@ -666,10 +668,13 @@ libanastasis_plugin_authorization_iban_init (void *cls) { char *fn; json_error_t err; + char *tmp; + tmp = GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR); GNUNET_asprintf (&fn, "%sauthorization-iban-messages.json", - GNUNET_OS_installation_get_path (GNUNET_OS_IPK_DATADIR)); + tmp); + GNUNET_free (tmp); ctx->messages = json_load_file (fn, JSON_REJECT_DUPLICATES, &err); -- cgit v1.2.3