From 3a5692bb27e561f7ae39e7a8e8bd1a29cd989884 Mon Sep 17 00:00:00 2001 From: mquinson Date: Sun, 7 Aug 2005 17:46:40 +0000 Subject: [PATCH] Avoid to use the data after freeing them, even in error reporting git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@1619 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/xbt/config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xbt/config.c b/src/xbt/config.c index 6f42ce93b6..e6a802e9dd 100644 --- 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) { + /* 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); -- 2.20.1