From: suter Date: Wed, 9 Oct 2013 08:06:26 +0000 (+0200) Subject: free dicts X-Git-Tag: v3_9_90~33 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/e5aef41dfd761cc587616e0148de2ca6686bc6e0?hp=fa6da87c649e2f58a7daa031b1d12aa3768d3630;ds=sidebyside free dicts --- diff --git a/teshsuite/msg/storage/storage.c b/teshsuite/msg/storage/storage.c index b6f649ad9b..a9d1ebcc23 100644 --- a/teshsuite/msg/storage/storage.c +++ b/teshsuite/msg/storage/storage.c @@ -41,6 +41,7 @@ void storage_info(msg_host_t host) storage = MSG_storage_get_by_name(storage_name); display_storage_properties(storage); } + xbt_dict_free(&storage_list); } void display_storage_properties(msg_storage_t storage){ @@ -107,6 +108,7 @@ void display_storage_info(msg_host_t host) { dump_storage_by_name(storage_name); } + xbt_dict_free(&storage_list); } void dump_storage_by_name(char *name){ @@ -133,16 +135,18 @@ void display_storage_content(msg_storage_t storage){ } else { XBT_INFO("No content."); } + xbt_dict_free(&content); } void get_set_storage_data(const char *storage_name){ - XBT_INFO("*** GET/SET DATA for storage element: %s ***",storage_name); - msg_storage_t storage = MSG_storage_get_by_name(storage_name); - char *data = MSG_storage_get_data(storage); - XBT_INFO("Get data: '%s'", data); - MSG_storage_set_data(storage,strdup("Some data")); - data = MSG_storage_get_data(storage); - XBT_INFO("Set and get data: '%s'", data); + XBT_INFO("*** GET/SET DATA for storage element: %s ***",storage_name); + msg_storage_t storage = MSG_storage_get_by_name(storage_name); + char *data = MSG_storage_get_data(storage); + XBT_INFO("Get data: '%s'", data); + + MSG_storage_set_data(storage,strdup("Some data")); + data = MSG_storage_get_data(storage); + XBT_INFO("Set and get data: '%s'", data); } int client(int argc, char *argv[])