- elimiate all paths
authorBart Polot <bart@net.in.tum.de>
Sat, 22 Mar 2014 02:58:33 +0000 (02:58 +0000)
committerBart Polot <bart@net.in.tum.de>
Sat, 22 Mar 2014 02:58:33 +0000 (02:58 +0000)
src/mesh/gnunet-service-mesh_peer.c

index d45e4f2b9931d8b66c8e8359469e98bbe5c25ff9..2884b1a53618058500786d46bebc00a7eabf6acc 100644 (file)
@@ -1808,9 +1808,8 @@ GMP_remove_path (struct MeshPeer *peer, struct MeshPeerPath *path)
                      sizeof (GNUNET_PEER_Id) * path->length))
     {
       GNUNET_CONTAINER_DLL_remove (peer->path_head, peer->path_tail, iter);
-      path_destroy (iter);
-      if (path == iter)
-        return;
+      if (path != iter)
+        path_destroy (iter);
     }
   }
   path_destroy (path);