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
make sure that every surf_parse is nicely cleaned at exit
[simgrid.git]
/
src
/
simgrid
/
sg_config.c
diff --git
a/src/simgrid/sg_config.c
b/src/simgrid/sg_config.c
index
8adf5ce
..
bd3cad5
100644
(file)
--- a/
src/simgrid/sg_config.c
+++ b/
src/simgrid/sg_config.c
@@
-362,7
+362,7
@@
static void _sg_cfg_cb__test_sleep(const char *name, int pos){
/* callback of the inclusion path */
static void _sg_cfg_cb__surf_path(const char *name, int pos)
{
/* callback of the inclusion path */
static void _sg_cfg_cb__surf_path(const char *name, int pos)
{
- char *path = xbt_
cfg_get_string_at(_sg_cfg_set, name, pos
);
+ char *path = xbt_
strdup(xbt_cfg_get_string_at(_sg_cfg_set, name, pos)
);
xbt_dynar_push(surf_path, &path);
}
xbt_dynar_push(surf_path, &path);
}
@@
-942,7
+942,7
@@
void sg_config_init(int *argc, char **argv)
xbt_assert((initial_path),
"__surf_get_initial_path() failed! Can't resolve current Windows directory");
xbt_assert((initial_path),
"__surf_get_initial_path() failed! Can't resolve current Windows directory");
- surf_path = xbt_dynar_new(sizeof(char *),
NULL
);
+ surf_path = xbt_dynar_new(sizeof(char *),
&xbt_free_ref
);
xbt_cfg_setdefault_string(_sg_cfg_set, "path", initial_path);
}
xbt_cfg_setdefault_string(_sg_cfg_set, "path", initial_path);
}