A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix memleak
[simgrid.git]
/
src
/
surf
/
surf_routing_full.cpp
diff --git
a/src/surf/surf_routing_full.cpp
b/src/surf/surf_routing_full.cpp
index
84b72a7
..
835583f
100644
(file)
--- a/
src/surf/surf_routing_full.cpp
+++ b/
src/surf/surf_routing_full.cpp
@@
-61,8
+61,10
@@
AsFull::~AsFull(){
/* Delete routing table */
for (i = 0; i < table_size; i++)
for (j = 0; j < table_size; j++) {
/* Delete routing table */
for (i = 0; i < table_size; i++)
for (j = 0; j < table_size; j++) {
- xbt_dynar_free(&TO_ROUTE_FULL(i,j)->link_list);
- xbt_free(TO_ROUTE_FULL(i,j));
+ if (TO_ROUTE_FULL(i,j)){
+ xbt_dynar_free(&TO_ROUTE_FULL(i,j)->link_list);
+ xbt_free(TO_ROUTE_FULL(i,j));
+ }
}
xbt_free(p_routingTable);
}
}
xbt_free(p_routingTable);
}