aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBart Polot <bart@net.in.tum.de>2013-06-25 15:20:28 +0000
committerBart Polot <bart@net.in.tum.de>2013-06-25 15:20:28 +0000
commit28c4cdc431b8ec7321d067866eda16c420c179e1 (patch)
tree7daad828a8bbb2d5a723fe4f5aebea756c085ade /src
parentd02a7556815c39b9fcc2c31173c7ea389e32bcc3 (diff)
downloadgnunet-28c4cdc431b8ec7321d067866eda16c420c179e1.tar.gz
gnunet-28c4cdc431b8ec7321d067866eda16c420c179e1.zip
- make sure to free all peer_rc on error
Diffstat (limited to 'src')
-rw-r--r--src/mesh/gnunet-service-mesh-new.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesh/gnunet-service-mesh-new.c b/src/mesh/gnunet-service-mesh-new.c
index 063469342..ce2579b90 100644
--- a/src/mesh/gnunet-service-mesh-new.c
+++ b/src/mesh/gnunet-service-mesh-new.c
@@ -1415,7 +1415,7 @@ peer_info_add_path (struct MeshPeerInfo *peer_info, struct MeshPeerPath *path,
1415 path_destroy (path); 1415 path_destroy (path);
1416 return; 1416 return;
1417 } 1417 }
1418 if (path->length <= 2 && GNUNET_NO == trusted) 1418 if (2 >= path->length && GNUNET_NO == trusted)
1419 { 1419 {
1420 /* Only allow CORE to tell us about direct paths */ 1420 /* Only allow CORE to tell us about direct paths */
1421 path_destroy (path); 1421 path_destroy (path);
@@ -1446,9 +1446,9 @@ peer_info_add_path (struct MeshPeerInfo *peer_info, struct MeshPeerPath *path,
1446 } 1446 }
1447#endif 1447#endif
1448 l = path_get_length (path); 1448 l = path_get_length (path);
1449 if (0 == l) 1449 if (2 >= l)
1450 { 1450 {
1451 GNUNET_free (path); 1451 path_destroy (path);
1452 return; 1452 return;
1453 } 1453 }
1454 1454