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.


incorporate changes to intelligent barriers
[palacios.git] / palacios / src / devices / lnx_virtio_vnet.c
index 5bf8ae0..f7795f5 100644 (file)
@@ -575,6 +575,12 @@ static int dev_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
     }
     
     vnet_state  = (struct virtio_vnet_state *)V3_Malloc(sizeof(struct virtio_vnet_state));
+
+    if (!vnet_state) {
+       PrintError("Cannot allocate in init\n");
+       return -1;
+    }
+
     memset(vnet_state, 0, sizeof(struct virtio_vnet_state));
        
     vnet_state->vm = vm;