X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/43f7ca1cac5ab1858e318fdd6239d0a0c3b3d893..7eed757b0efb54a58b781ea4a8c963f0b6321b92:/src/instr/instr_paje_types.cpp diff --git a/src/instr/instr_paje_types.cpp b/src/instr/instr_paje_types.cpp index 333e8062cb..daa0d4eaf7 100644 --- a/src/instr/instr_paje_types.cpp +++ b/src/instr/instr_paje_types.cpp @@ -26,7 +26,7 @@ static type_t newType (const char *typeNameBuff, const char *key, const char *co THROWF(tracing_error, 0, "can't create a new type with name or key equal nullptr"); } - type_t ret = xbt_new0(s_type_t, 1); + type_t ret = xbt_new0(s_type, 1); ret->name = xbt_strdup (typeNameBuff); ret->father = father; ret->kind = kind; @@ -47,15 +47,12 @@ static type_t newType (const char *typeNameBuff, const char *key, const char *co void PJ_type_free (type_t type) { - val_t value; + value* val; char *value_name; xbt_dict_cursor_t cursor = nullptr; - xbt_dict_foreach(type->values, cursor, value_name, value) { - XBT_DEBUG("free value %s, child of %s", value->name, value->father->name); - xbt_free(value->name); - xbt_free(value->color); - xbt_free(value->id); - xbt_free(value); + xbt_dict_foreach (type->values, cursor, value_name, val) { + XBT_DEBUG("free value %s, child of %s", val->name, val->father->name); + delete val; } xbt_dict_free (&type->values); xbt_free (type->name);