X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_hypercall.c;h=689964026a7cca97c768f31d05a3c73b88998fd8;hb=c2218fcbc6023d380dbf88895fed679a8e14a210;hp=6cb51e039fafac5d7b21bbef96677528502ec5de;hpb=002d46c777ac52048d0a3e82c80821ad3c8fef46;p=palacios.git diff --git a/palacios/src/palacios/vmm_hypercall.c b/palacios/src/palacios/vmm_hypercall.c index 6cb51e0..6899640 100644 --- a/palacios/src/palacios/vmm_hypercall.c +++ b/palacios/src/palacios/vmm_hypercall.c @@ -136,6 +136,11 @@ int v3_register_hypercall(struct v3_vm_info * vm, hcall_id_t hypercall_id, struct hypercall * hcall = (struct hypercall *)V3_Malloc(sizeof(struct hypercall)); + if (!hcall) { + PrintError("Cannot allocate in registering hypercall\n"); + return -1; + } + hcall->id = hypercall_id; hcall->priv_data = priv_data; hcall->hcall_fn = hypercall;