gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r27188 - gnunet/src/mesh


From: gnunet
Subject: [GNUnet-SVN] r27188 - gnunet/src/mesh
Date: Thu, 16 May 2013 20:03:40 +0200

Author: bartpolot
Date: 2013-05-16 20:03:40 +0200 (Thu, 16 May 2013)
New Revision: 27188

Modified:
   gnunet/src/mesh/gnunet-service-mesh-new.c
Log:
- avoid double free

Modified: gnunet/src/mesh/gnunet-service-mesh-new.c
===================================================================
--- gnunet/src/mesh/gnunet-service-mesh-new.c   2013-05-16 18:01:25 UTC (rev 
27187)
+++ gnunet/src/mesh/gnunet-service-mesh-new.c   2013-05-16 18:03:40 UTC (rev 
27188)
@@ -1488,6 +1488,7 @@
  *
  * @param peer_info Peer to add the path to, being the origin of the path.
  * @param path New path to add after being inversed.
+ *             Path will be either used or freed.
  * @param trusted Do we trust that this path is real?
  */
 static void
@@ -3052,14 +3053,12 @@
     GNUNET_PEER_change_rc(t->next_hop, 1);
 
     /* It's for somebody else! Retransmit. */
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  Retransmitting.\n");
     path2 = path_duplicate (path);
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "  Retransmitting.\n");
     peer_info_add_path (dest_peer_info, path2, GNUNET_NO);
-    path2 = path_duplicate (path);
-    peer_info_add_path_to_origin (orig_peer_info, path2, GNUNET_NO);
+    peer_info_add_path_to_origin (orig_peer_info, path, GNUNET_NO);
     send_create_path (t);
   }
-  path_destroy (path);
   return GNUNET_OK;
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]