diff options
author | Bart Polot <bart@net.in.tum.de> | 2013-12-12 19:06:12 +0000 |
---|---|---|
committer | Bart Polot <bart@net.in.tum.de> | 2013-12-12 19:06:12 +0000 |
commit | 339623455e865dff8eeaf9a33a9aab5ed93be237 (patch) | |
tree | e5909eec9534a4442e60587fb639e4e344f9f98b /src | |
parent | 25611d2bd7b7701903d49406500b0a38cde26c9d (diff) | |
download | gnunet-339623455e865dff8eeaf9a33a9aab5ed93be237.tar.gz gnunet-339623455e865dff8eeaf9a33a9aab5ed93be237.zip |
- fix delete loop
Diffstat (limited to 'src')
-rw-r--r-- | src/mesh/gnunet-service-mesh_tunnel.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesh/gnunet-service-mesh_tunnel.c b/src/mesh/gnunet-service-mesh_tunnel.c index 92244937e..69c47ae20 100644 --- a/src/mesh/gnunet-service-mesh_tunnel.c +++ b/src/mesh/gnunet-service-mesh_tunnel.c | |||
@@ -1759,15 +1759,19 @@ void | |||
1759 | GMT_remove_connection (struct MeshTunnel3 *t, struct MeshConnection *c) | 1759 | GMT_remove_connection (struct MeshTunnel3 *t, struct MeshConnection *c) |
1760 | { | 1760 | { |
1761 | struct MeshTConnection *aux; | 1761 | struct MeshTConnection *aux; |
1762 | struct MeshTConnection *next; | ||
1762 | 1763 | ||
1763 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Removing connection %s from tunnel %s\n", | 1764 | LOG (GNUNET_ERROR_TYPE_DEBUG, "Removing connection %s from tunnel %s\n", |
1764 | GMC_2s (c), GMT_2s (t)); | 1765 | GMC_2s (c), GMT_2s (t)); |
1765 | for (aux = t->connection_head; aux != NULL; aux = aux->next) | 1766 | for (aux = t->connection_head; aux != NULL; aux = next) |
1767 | { | ||
1768 | next = aux->next; | ||
1766 | if (aux->c == c) | 1769 | if (aux->c == c) |
1767 | { | 1770 | { |
1768 | GNUNET_CONTAINER_DLL_remove (t->connection_head, t->connection_tail, aux); | 1771 | GNUNET_CONTAINER_DLL_remove (t->connection_head, t->connection_tail, aux); |
1769 | GNUNET_free (aux); | 1772 | GNUNET_free (aux); |
1770 | } | 1773 | } |
1774 | } | ||
1771 | 1775 | ||
1772 | /* Start new connections if needed */ | 1776 | /* Start new connections if needed */ |
1773 | if (NULL == t->connection_head) | 1777 | if (NULL == t->connection_head) |