diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-27 14:58:46 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-27 14:58:46 +0200 |
commit | b3ddcd0dbb6cf0db09f7bd156d73b3cb8e284e2d (patch) | |
tree | 3371c706be8e44e47c530a4d4b85fe38980630eb /src/authorization/anastasis_authorization_plugin_sms.c | |
parent | e2f67e7bf9c3779720b9a61012a4d0c0c4b6e1d1 (diff) | |
download | anastasis-b3ddcd0dbb6cf0db09f7bd156d73b3cb8e284e2d.tar.gz anastasis-b3ddcd0dbb6cf0db09f7bd156d73b3cb8e284e2d.tar.bz2 anastasis-b3ddcd0dbb6cf0db09f7bd156d73b3cb8e284e2d.zip |
-fix misc. memory leaks
Diffstat (limited to 'src/authorization/anastasis_authorization_plugin_sms.c')
-rw-r--r-- | src/authorization/anastasis_authorization_plugin_sms.c | 7 |
1 files changed, 6 insertions, 1 deletions
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); |