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.


typo fix
[palacios.git] / palacios / src / devices / keyboard.c
index 039db76..0c1837f 100644 (file)
@@ -26,6 +26,7 @@
 #include <palacios/vmm_intr.h>
 #include <palacios/vmm_host_events.h>
 #include <palacios/vm_guest.h>
+#include <palacios/vmm_debug.h>
 
 
 #ifndef V3_CONFIG_DEBUG_KEYBOARD
@@ -1130,6 +1131,11 @@ static int keyboard_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
 
     kbd = (struct keyboard_internal *)V3_Malloc(sizeof(struct keyboard_internal));
 
+    if (!kbd) {
+       PrintError("Cannot allocate in init\n");
+       return -1;
+    }
+
     memset(kbd, 0, sizeof(struct keyboard_internal));
 
     kbd->vm = vm;