- xbt_dict_set (last_platform_variables, xbt_strdup (timekey), xbt_strdup (nowdeltastr), xbt_free);
- xbt_dict_set (last_platform_variables, xbt_strdup (valuekey), xbt_strdup (valuestr), xbt_free);
- xbt_dict_set (last_platform_variables, xbt_strdup (variablekey), xbt_strdup (variable), xbt_free);
+ char *nowdeltastr_cpy = xbt_strdup (nowdeltastr);
+ char *valuestr_cpy = xbt_strdup (valuestr);
+ char *variable_cpy = xbt_strdup (variable);
+ xbt_dict_set (last_platform_variables, timekey, nowdeltastr_cpy, xbt_free);
+ xbt_dict_set (last_platform_variables, valuekey, valuestr_cpy, xbt_free);
+ xbt_dict_set (last_platform_variables, variablekey, variable_cpy, xbt_free);