From: Lei Xia Date: Tue, 23 Nov 2010 17:05:43 +0000 (-0600) Subject: Minor fix X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=9a9f3939dfe7cb228d88853fc253b00572404e74;p=palacios-OLD.git Minor fix --- diff --git a/palacios/src/devices/8259a.c b/palacios/src/devices/8259a.c index 9bbef1e..bbe6e39 100644 --- a/palacios/src/devices/8259a.c +++ b/palacios/src/devices/8259a.c @@ -749,11 +749,10 @@ static int pic_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) { // PIC is only usable in non-multicore environments // just hardcode the core context struct guest_info * core = &(vm->cores[0]); + + state = (struct pic_internal *)V3_Malloc(sizeof(struct pic_internal)); V3_ASSERT(state != NULL); - - state = (struct pic_internal *)V3_Malloc(sizeof(struct pic_internal)); - struct vm_device * dev = v3_add_device(vm, dev_id, &dev_ops, state); diff --git a/palacios/src/devices/vnet_nic.c b/palacios/src/devices/vnet_nic.c index a391b5e..4850d93 100644 --- a/palacios/src/devices/vnet_nic.c +++ b/palacios/src/devices/vnet_nic.c @@ -196,7 +196,7 @@ static int vnet_nic_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) { &(vnetnic->net_ops), frontend_cfg, vnetnic) == -1) { PrintError("Could not connect %s to frontend %s\n", dev_id, v3_cfg_val(frontend_cfg, "tag")); - v3_remove_device(vnetnic); + v3_remove_device(dev); return -1; } @@ -205,7 +205,7 @@ static int vnet_nic_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) { if ((vnet_dev_id = register_to_vnet(vm, vnetnic, dev_id, vnetnic->mac)) == -1) { PrintError("Vnet-nic device %s (mac: %s) fails to registered to VNET\n", dev_id, macstr); - v3_remove_device(vnetnic); + v3_remove_device(dev); return 0; }