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 / timer.c
index 31c47de..97d5d7d 100644 (file)
@@ -56,7 +56,11 @@ static struct v3_device_ops dev_ops = {
 static int timer_init(struct guest_info * vm, void * cfg_data) {
     struct timer_state * timer = NULL;
     timer = (struct timer_state *)V3_Malloc( sizeof(struct timer_state));
-    V3_ASSERT(timer != NULL);
+
+    if (!timer) {
+       PrintError("Cannot allocate in init\n");
+       return -1;
+    }
 
     struct vm_device * dev = v3_allocate_device("TIMER", &dev_ops, timer);