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.


Paranoid error checking in userspace utils
[palacios.git] / linux_usr / v3_create.c
index 4bc5ab5..3605702 100644 (file)
@@ -52,6 +52,10 @@ int main(int argc, char* argv[]) {
     
     // load guest image into user memory
     guest_img.guest_data = malloc(guest_img.size);
+    if (!guest_img.guest_data) {
+            printf("ERROR: could not allocate memory for guest image\n");
+            return -1;
+    }
 
     read_file(guest_fd, guest_img.size, guest_img.guest_data);