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.


Added updated sleep/wakeup functionality
[palacios.git] / palacios / src / palacios / vmm_telemetry.c
index 0195cfe..1fb128a 100644 (file)
@@ -162,6 +162,11 @@ static struct exit_event * get_exit(struct guest_info * info, uint_t exit_code)
 static inline struct exit_event * create_exit(uint_t exit_code) {
     struct exit_event * evt = V3_Malloc(sizeof(struct exit_event));
 
+    if (!evt) {
+       PrintError("Cannot allocate in createing exit in telemetry\n");
+       return NULL;
+    }
+
     evt->exit_code = exit_code;
     evt->cnt = 0;
     evt->handler_time = 0;
@@ -219,6 +224,11 @@ void v3_add_telemetry_cb(struct v3_vm_info * vm,
     struct v3_telemetry_state * telemetry = &(vm->telemetry);
     struct telemetry_cb * cb = (struct telemetry_cb *)V3_Malloc(sizeof(struct telemetry_cb));
 
+    if (!cb) {
+       PrintError("Cannot allocate in adding a telemtry callback\n");
+       return ;
+    }
+
     cb->private_data = private_data;
     cb->telemetry_fn = telemetry_fn;