From: Jack Lange Date: Wed, 12 Jan 2011 19:36:09 +0000 (-0600) Subject: free configuration data during deinitialization X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=f77cde571176f0fa2479ebc6bb99cc043aca2113;p=palacios.git free configuration data during deinitialization --- diff --git a/palacios/include/palacios/vmm_config.h b/palacios/include/palacios/vmm_config.h index 34ad114..fe82063 100644 --- a/palacios/include/palacios/vmm_config.h +++ b/palacios/include/palacios/vmm_config.h @@ -35,6 +35,7 @@ struct v3_vm_info; struct v3_vm_info * v3_config_guest( void * cfg_blob, void * priv_data); +int v3_free_config(struct v3_vm_info * vm); struct v3_cfg_file { void * data; diff --git a/palacios/src/palacios/vm_guest.c b/palacios/src/palacios/vm_guest.c index 0e8e5f2..36ec7d2 100644 --- a/palacios/src/palacios/vm_guest.c +++ b/palacios/src/palacios/vm_guest.c @@ -575,7 +575,7 @@ int v3_free_vm_internal(struct v3_vm_info * vm) { v3_deinit_hypercall_map(vm); #ifdef CONFIG_TELEMETRY - v3_deinit_telemetry(vm); + //v3_deinit_telemetry(vm); #endif return 0; diff --git a/palacios/src/palacios/vmm.c b/palacios/src/palacios/vmm.c index 3bd27a8..a82fb42 100644 --- a/palacios/src/palacios/vmm.c +++ b/palacios/src/palacios/vmm.c @@ -310,6 +310,8 @@ int v3_free_vm(struct v3_vm_info * vm) { // free vm v3_free_vm_internal(vm); + v3_free_config(vm); + V3_Free(vm); return 0; diff --git a/palacios/src/palacios/vmm_config.c b/palacios/src/palacios/vmm_config.c index 3dd7915..572f01a 100644 --- a/palacios/src/palacios/vmm_config.c +++ b/palacios/src/palacios/vmm_config.c @@ -531,6 +531,16 @@ struct v3_vm_info * v3_config_guest(void * cfg_blob, void * priv_data) { +int v3_free_config(struct v3_vm_info * vm) { + + v3_free_htable(vm->cfg_data->file_table, 1, 0); + + v3_xml_free(vm->cfg_data->cfg); + + V3_Free(vm->cfg_data); + return 0; +} + static int setup_memory_map(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {