fixed memory leak
authorMatthias Wachs <wachs@net.in.tum.de>
Wed, 20 Apr 2011 12:18:57 +0000 (12:18 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Wed, 20 Apr 2011 12:18:57 +0000 (12:18 +0000)
src/transport/gnunet-service-transport.c

index 522dcf9424ccf150f4c91c5f0da7267d85e35fea..cfb51db61b3c7394fcd0ed523a3ef8eadbee48ac 100644 (file)
@@ -2509,6 +2509,8 @@ plugin_env_session_end  (void *cls,
       GNUNET_SCHEDULER_cancel (pos->revalidate_task);
       pos->revalidate_task = GNUNET_SCHEDULER_NO_TASK;
     }
+  GNUNET_free_non_null(pos->ressources);
+  GNUNET_free_non_null(pos->quality);
   GNUNET_free (pos);
   if (nl->received_pong == GNUNET_NO)
     return; /* nothing to do, never connected... */
@@ -4832,7 +4834,7 @@ disconnect_neighbour (struct NeighbourList *n, int check)
                  peer_pos->ressources = NULL;
                  GNUNET_free(peer_pos->quality);
                  peer_pos->ressources = NULL;
-          GNUNET_free(peer_pos);
+                 GNUNET_free(peer_pos);
         }
       GNUNET_free (rpos);
     }