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
Avoid to use the data after freeing them, even in error reporting
[simgrid.git]
/
src
/
xbt
/
config.c
diff --git
a/src/xbt/config.c
b/src/xbt/config.c
index
6f42ce9
..
e6a802e
100644
(file)
--- a/
src/xbt/config.c
+++ b/
src/xbt/config.c
@@
-575,6
+575,8
@@
xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) {
TRY {
variable = xbt_dict_get((xbt_dict_t)cfg,name);
} CATCH(e) {
TRY {
variable = xbt_dict_get((xbt_dict_t)cfg,name);
} CATCH(e) {
+ /* put it back on what won't get freed, ie within "options" and out of "optionlist_cpy" */
+ name = (char*) (optionlist_cpy-name + options);
free(optionlist_cpy);
if (e.category == not_found_error) {
xbt_ex_free(e);
free(optionlist_cpy);
if (e.category == not_found_error) {
xbt_ex_free(e);