aboutsummaryrefslogtreecommitdiff
path: root/src/identity/gnunet-service-identity.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-11-09 20:08:41 +0000
committerChristian Grothoff <christian@grothoff.org>2013-11-09 20:08:41 +0000
commitf2e6a9f69138f60a337d23d9149c7eab109f6f0a (patch)
treeb92dc107549a9a4aac1d737e51b3028353f7923a /src/identity/gnunet-service-identity.c
parente152ab9bef07c26670f8f5a4cad4c56763342521 (diff)
-fix memory leak on shutdown (3104)
Diffstat (limited to 'src/identity/gnunet-service-identity.c')
-rw-r--r--src/identity/gnunet-service-identity.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/identity/gnunet-service-identity.c b/src/identity/gnunet-service-identity.c
index e0c0bd783a..3024ce816e 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);