X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fpci_passthrough.c;h=102c6eb2beee2dd55c2390f9bda9d8c65b6c7cf4;hb=c2218fcbc6023d380dbf88895fed679a8e14a210;hp=e8d72db13db5073558fc5b31a8dec8e65331927b;hpb=3938dc8f325981eab29bda77f43fa1be1d91c54f;p=palacios.git diff --git a/palacios/src/devices/pci_passthrough.c b/palacios/src/devices/pci_passthrough.c index e8d72db..102c6eb 100644 --- a/palacios/src/devices/pci_passthrough.c +++ b/palacios/src/devices/pci_passthrough.c @@ -779,6 +779,10 @@ static int passthrough_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) { struct vm_device * pci = v3_find_dev(vm, v3_cfg_val(cfg, "bus")); char * dev_id = v3_cfg_val(cfg, "ID"); + if (!state) { + PrintError("Cannot allocate in init\n"); + return -1; + } memset(state, 0, sizeof(struct pt_dev_state));