Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


minor bug fixes, and copyright additions
[palacios.releases.git] / palacios / src / palacios / vmm_dev_mgr.c
index 7f43e34..10c1112 100644 (file)
@@ -1,3 +1,7 @@
+/* (c) 2008, Jack Lange <jarusl@cs.northwestern.edu> */
+/* (c) 2008, The V3VEE Project <http://www.v3vee.org> */
+
+
 #include <palacios/vm_dev.h>
 #include <palacios/vmm_dev_mgr.h>
 #include <palacios/vm_guest.h>
@@ -25,8 +29,9 @@ int dev_mgr_init(struct guest_info * info) {
 int dev_mgr_deinit(struct guest_info * info) {
   struct vm_device * dev;
   struct vmm_dev_mgr * mgr = &(info->dev_mgr);
+  struct vm_device * tmp;
 
-  list_for_each_entry(dev, &(mgr->dev_list), dev_link) {
+  list_for_each_entry_safe(dev, tmp, &(mgr->dev_list), dev_link) {
     v3_unattach_device(dev);
     free_device(dev);
   }