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
Update function __SD_link_destroy
[simgrid.git]
/
src
/
simdag
/
sd_link.c
diff --git
a/src/simdag/sd_link.c
b/src/simdag/sd_link.c
index
3a42574
..
dc3076e
100644
(file)
--- a/
src/simdag/sd_link.c
+++ b/
src/simdag/sd_link.c
@@
-90,11
+90,14
@@
void __SD_link_destroy(void *link) {
CHECK_INIT_DONE();
xbt_assert0(link != NULL, "Invalid parameter");
CHECK_INIT_DONE();
xbt_assert0(link != NULL, "Invalid parameter");
- if (((SD_link_t) link)->sd_data != NULL)
- xbt_free(((SD_link_t) link)->sd_data);
-
- /* TODO: name */
+ SD_link_data_t sd_data = ((SD_link_t) link)->data;
+ if (sd_data != NULL) {
+ if (sd_data->name != NULL)
+ xbt_free(sd_data->name);
+ xbt_free(sd_data);
+ }
+
xbt_free(link);
}
xbt_free(link);
}