X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/62bf48b13cea7b6b63f3d3e70b2a857cef442994..9b8c19c2b3028ebeef9f76f159af56acd5739c6d:/src/surf/storage.c diff --git a/src/surf/storage.c b/src/surf/storage.c index 90fd83fcba..aa0f3eb37c 100644 --- a/src/surf/storage.c +++ b/src/surf/storage.c @@ -93,7 +93,6 @@ static surf_action_t storage_action_open(void *storage, const char* mount, XBT_DEBUG("File '%s' was not found, file created.",path); } surf_file_t file = xbt_new0(s_surf_file_t,1); - file->info = xbt_malloc0(sizeof(s_file_info_t)); file->name = xbt_strdup(path); file->size = size; file->mount = xbt_strdup(mount); @@ -224,6 +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 = 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); }