Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
remove older mpich test suite
[simgrid.git] / src / surf / storage.c
index 0c00d18..aa0f3eb 100644 (file)
@@ -223,7 +223,7 @@ static void* storage_create_resource(const char* id, const char* model,
   storage->content = parse_storage_content((char*)content_name,&(storage->used_size));
   storage->content_type = xbt_strdup(content_type);
   storage->size = storage_type->size;
-  storage->type_id = type_id;
+  storage->type_id = xbt_strdup(type_id);
 
   xbt_lib_set(storage_lib, id, SURF_STORAGE_LEVEL, storage);
 
@@ -657,6 +657,8 @@ static XBT_INLINE void surf_storage_resource_free(void *r)
   storage_t storage = r;
   xbt_dict_free(&storage->content);
   xbt_dynar_free(&storage->write_actions);
+  free(storage->type_id);
+  free(storage->content_type);
   // generic resource
   surf_resource_free(r);
 }