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.


Lots of pedantic error checking in Palacios proper, especially for memory
[palacios.git] / palacios / src / devices / disk_model.c
index b142547..74d40a1 100644 (file)
@@ -91,6 +91,10 @@ static int connect_fn(struct v3_vm_info * vm,
   uint32_t seek_time = atoi(v3_cfg_val(cfg, "seek_us"));
   struct disk_state * model = (struct disk_state *)V3_Malloc(sizeof(struct disk_state));
 
+  if (!model) {
+      PrintError("Cannot allocate\n");
+      return -1;
+  }
 
   model->ops = ops;
   model->seek_usecs = seek_time;