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
Last corrections of Tesh tool.
[simgrid.git]
/
tools
/
tesh2
/
src
/
variable.c
diff --git
a/tools/tesh2/src/variable.c
b/tools/tesh2/src/variable.c
index
76894fb
..
d89983c
100644
(file)
--- a/
tools/tesh2/src/variable.c
+++ b/
tools/tesh2/src/variable.c
@@
-30,9
+30,12
@@
variable_free(variable_t* variableptr)
{
\r
if(!(*variableptr))
\r
return EINVAL;
\r
-
\r
- free((*((variable_t*)(variableptr)))->name);
\r
- free((*((variable_t*)(variableptr)))->val);
\r
+
\r
+ if((*((variable_t*)(variableptr)))->name)
\r
+ free((*((variable_t*)(variableptr)))->name);
\r
+
\r
+ if((*((variable_t*)(variableptr)))->val)
\r
+ free((*((variable_t*)(variableptr)))->val);
\r
\r
free(*variableptr);
\r
\r