-fix typo
authorChristian Grothoff <christian@grothoff.org>
Tue, 10 Feb 2015 16:51:17 +0000 (16:51 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 10 Feb 2015 16:51:17 +0000 (16:51 +0000)
src/ats/ats_api_scheduling.c

index e4db144d084103a9109c981fc7d0c6013b8522ba..ed82dd2ada8bb97d4cbc7a0dc860af58eb27e494 100644 (file)
@@ -615,6 +615,8 @@ GNUNET_ATS_scheduling_init (const struct GNUNET_CONFIGURATION_Handle *cfg,
 void
 GNUNET_ATS_scheduling_done (struct GNUNET_ATS_SchedulingHandle *sh)
 {
+  unsigned int i;
+
   if (NULL != sh->mq)
   {
     GNUNET_MQ_destroy (sh->mq);
@@ -630,6 +632,11 @@ GNUNET_ATS_scheduling_done (struct GNUNET_ATS_SchedulingHandle *sh)
     GNUNET_SCHEDULER_cancel (sh->task);
     sh->task = NULL;
   }
+  for (i=0;i<sh->session_array_size;i++)
+  {
+    GNUNET_free_non_null (sh->session_array[i]);
+    sh->session_array[i] = NULL;
+  }
   GNUNET_array_grow (sh->session_array,
                      sh->session_array_size,
                      0);