aboutsummaryrefslogtreecommitdiff
path: root/src/identity
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
parente152ab9bef07c26670f8f5a4cad4c56763342521 (diff)
downloadgnunet-f2e6a9f69138f60a337d23d9149c7eab109f6f0a.tar.gz
gnunet-f2e6a9f69138f60a337d23d9149c7eab109f6f0a.zip
-fix memory leak on shutdown (3104)
Diffstat (limited to 'src/identity')
-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 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)
161 { 161 {
162 GNUNET_CONTAINER_DLL_remove (ego_head, ego_tail, e); 162 GNUNET_CONTAINER_DLL_remove (ego_head, ego_tail, e);
163 GNUNET_free (e->pk); 163 GNUNET_free (e->pk);
164 GNUNET_free (e->identifier);
164 GNUNET_free (e); 165 GNUNET_free (e);
165 } 166 }
166} 167}
@@ -821,13 +822,13 @@ process_ego_file (void *cls,
821 ego = GNUNET_new (struct Ego); 822 ego = GNUNET_new (struct Ego);
822 ego->pk = GNUNET_CRYPTO_ecdsa_key_create_from_file (filename); 823 ego->pk = GNUNET_CRYPTO_ecdsa_key_create_from_file (filename);
823 if (NULL == ego->pk) 824 if (NULL == ego->pk)
824 { 825 {
825 GNUNET_free (ego); 826 GNUNET_free (ego);
826 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 827 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
827 _("Failed to parse ego information in `%s'\n"), 828 _("Failed to parse ego information in `%s'\n"),
828 filename); 829 filename);
829 return GNUNET_OK; 830 return GNUNET_OK;
830 } 831 }
831 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 832 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
832 "Loaded ego `%s'\n", 833 "Loaded ego `%s'\n",
833 fn + 1); 834 fn + 1);