From: Christian Grothoff Date: Sat, 9 Nov 2013 20:08:41 +0000 (+0000) Subject: -fix memory leak on shutdown (3104) X-Git-Tag: initial-import-from-subversion-38251~6158 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f2e6a9f69138f60a337d23d9149c7eab109f6f0a;p=oweals%2Fgnunet.git -fix memory leak on shutdown (3104) --- diff --git a/src/identity/gnunet-service-identity.c b/src/identity/gnunet-service-identity.c index e0c0bd783..3024ce816 100644 --- a/src/identity/gnunet-service-identity.c +++ b/src/identity/gnunet-service-identity.c @@ -161,6 +161,7 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { GNUNET_CONTAINER_DLL_remove (ego_head, ego_tail, e); GNUNET_free (e->pk); + GNUNET_free (e->identifier); GNUNET_free (e); } } @@ -821,13 +822,13 @@ process_ego_file (void *cls, ego = GNUNET_new (struct Ego); ego->pk = GNUNET_CRYPTO_ecdsa_key_create_from_file (filename); if (NULL == ego->pk) - { - GNUNET_free (ego); - GNUNET_log (GNUNET_ERROR_TYPE_WARNING, - _("Failed to parse ego information in `%s'\n"), - filename); - return GNUNET_OK; - } + { + GNUNET_free (ego); + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, + _("Failed to parse ego information in `%s'\n"), + filename); + return GNUNET_OK; + } GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Loaded ego `%s'\n", fn + 1);