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 / palacios / vmm_chkpt_stores.h
index 3c2572b..61115a4 100644 (file)
@@ -223,9 +223,23 @@ static void * dir_open_ctx(void * store_data,
 
 
     ctx = V3_Malloc(sizeof(struct file_ctx));
+
+    if (!ctx) {
+       PrintError("Cannot allocate\n");
+       return NULL;
+    }
+
     memset(ctx, 0, sizeof(struct file_ctx));
 
     ctx->filename = V3_Malloc(strlen(url) + strlen(name) + 5);
+
+    if (!ctx->filename) {
+       PrintError("Cannot allocate\n");
+       V3_Free(ctx);
+       return -1;
+    }
+
+
     memset(ctx->filename, 0, strlen(url) + strlen(name) + 5);
 
     snprintf(ctx->filename, strlen(url) + strlen(name) + 5, "%s/%s", url, name);