Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
What's not malloced cannot be leaked
authorMartin Quinson <martin.quinson@loria.fr>
Sun, 17 Apr 2016 12:43:06 +0000 (14:43 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Sun, 17 Apr 2016 12:43:09 +0000 (14:43 +0200)
commita7c05e186c0c2c4555d127909c1898f0668c050c
tree84a2912371595c8cabfd4ec5136e9c5ff3a1397c
parent4307004096e8d32385e4cf451a52bbef1a46d95e
What's not malloced cannot be leaked

The core of this change is the following:
--- a/src/surf/xml/platf_private.hpp
+++ b/src/surf/xml/platf_private.hpp
@@ -91,7 +91,7 @@ typedef struct s_sg_platf_route_cbarg {
   const char *dst;
   sg_netcard_t gw_src;
   sg_netcard_t gw_dst;
-  std::vector<Link*> *link_list;
+  std::vector<Link*> link_list;
 } s_sg_platf_route_cbarg_t;

-----------

The rest of the changes are just code adaptation to that change.
13 files changed:
src/bindings/lua/lua_platf.cpp
src/s4u/s4u_as.cpp
src/surf/AsCluster.cpp
src/surf/AsClusterFatTree.cpp
src/surf/AsClusterTorus.cpp
src/surf/AsDijkstra.cpp
src/surf/AsFloyd.cpp
src/surf/AsFull.cpp
src/surf/AsImpl.cpp
src/surf/AsRoutedGraph.cpp
src/surf/AsVivaldi.cpp
src/surf/xml/platf_private.hpp
src/surf/xml/surfxml_sax_cb.cpp