X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/2acbecefb11b84dc60b6b00328fd307cd7302f19..ffb6b3fc6c9b2b1a1032e4de24cb0c9c2aba19b4:/src/xbt/config.c diff --git a/src/xbt/config.c b/src/xbt/config.c index 1de8868927..39bde111d9 100644 --- a/src/xbt/config.c +++ b/src/xbt/config.c @@ -609,8 +609,11 @@ xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) { switch (cell->type) { case xbt_cfgelm_string: - TRYCLEAN(xbt_cfg_set_string(cfg, name, val), - xbt_free(optionlist_cpy)); + errcode = xbt_cfg_set_string(cfg, name, val); + if (errcode != no_error) { + xbt_free(optionlist_cpy); + return errcode; + } break; case xbt_cfgelm_int: @@ -622,8 +625,11 @@ xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) { name); } - TRYCLEAN(xbt_cfg_set_int(cfg,name,i), - xbt_free(optionlist_cpy)); + errcode = xbt_cfg_set_int(cfg,name,i); + if (errcode != no_error) { + xbt_free(optionlist_cpy); + return errcode; + } break; case xbt_cfgelm_double: @@ -635,8 +641,11 @@ xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) { name); } - TRYCLEAN(xbt_cfg_set_double(cfg,name,d), - xbt_free(optionlist_cpy)); + errcode = xbt_cfg_set_double(cfg,name,d); + if (errcode != no_error) { + xbt_free(optionlist_cpy); + return errcode; + } break; case xbt_cfgelm_host: @@ -658,8 +667,11 @@ xbt_cfg_set_parse(xbt_cfg_t cfg, const char *options) { name); } - TRYCLEAN(xbt_cfg_set_host(cfg,name,str,i), - xbt_free(optionlist_cpy)); + errcode = xbt_cfg_set_host(cfg,name,str,i); + if (errcode != no_error) { + xbt_free(optionlist_cpy); + return errcode; + } break; default: