From: Jack Lange Date: Fri, 10 Jul 2009 23:00:55 +0000 (-0500) Subject: fixed null memory list bug in print_shadow_map X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=commitdiff_plain;h=183211e5bf60474e63c4159a63ca1f5d445491fd fixed null memory list bug in print_shadow_map --- diff --git a/palacios/src/palacios/vmm_mem.c b/palacios/src/palacios/vmm_mem.c index 182e563..000dac0 100644 --- a/palacios/src/palacios/vmm_mem.c +++ b/palacios/src/palacios/vmm_mem.c @@ -206,7 +206,7 @@ struct v3_shadow_region * insert_shadow_region(struct guest_info * info, if ((ret = __insert_shadow_region(info, region))) { return ret; } - + v3_rb_insert_color(&(region->tree_node), &(info->mem_map.shdw_regions)); @@ -406,6 +406,12 @@ void print_shadow_map(struct guest_info * info) { (void *)(reg->guest_end - 1), (void *)(reg->host_addr)); + + // If the memory map is empty, don't print it + if (node == NULL) { + return; + } + do { reg = rb_entry(node, struct v3_shadow_region, tree_node);