diff options
Diffstat (limited to 'src/authorization')
4 files changed, 24 insertions, 4 deletions
diff --git a/src/authorization/anastasis_authorization_plugin_email.c b/src/authorization/anastasis_authorization_plugin_email.c index 3d42aa3..78c12ca 100644 --- a/src/authorization/anastasis_authorization_plugin_email.c +++ b/src/authorization/anastasis_authorization_plugin_email.c @@ -167,8 +167,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; } } @@ -552,10 +554,13 @@ libanastasis_plugin_authorization_email_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-email-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); 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); diff --git a/src/authorization/anastasis_authorization_plugin_post.c b/src/authorization/anastasis_authorization_plugin_post.c index 30cea88..98dd042 100644 --- a/src/authorization/anastasis_authorization_plugin_post.c +++ b/src/authorization/anastasis_authorization_plugin_post.c @@ -162,8 +162,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; } } @@ -606,10 +608,13 @@ libanastasis_plugin_authorization_post_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-post-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); diff --git a/src/authorization/anastasis_authorization_plugin_sms.c b/src/authorization/anastasis_authorization_plugin_sms.c index df398fd..4922380 100644 --- a/src/authorization/anastasis_authorization_plugin_sms.c +++ b/src/authorization/anastasis_authorization_plugin_sms.c @@ -166,8 +166,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; } } @@ -543,10 +545,13 @@ libanastasis_plugin_authorization_sms_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-sms-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); |