X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fvnet_nic.c;h=526da07914570adb29d0963b31815aff6e2b3378;hb=19380bd81ad18d160a6c30804f91c531b87ac69d;hp=a391b5ecb70aeb91dc8ac580c07e5bde10b1bcf2;hpb=c80aaab03156ec020bd4a76688ff6d2544955bf3;p=palacios-OLD.git diff --git a/palacios/src/devices/vnet_nic.c b/palacios/src/devices/vnet_nic.c index a391b5e..526da07 100644 --- a/palacios/src/devices/vnet_nic.c +++ b/palacios/src/devices/vnet_nic.c @@ -117,12 +117,15 @@ static void stop_tx(void * private_data){ } -static int vnet_nic_free(struct vm_device * dev) { +static int vnet_nic_free(struct vnet_nic_state * vnetnic) { + + + V3_Free(vnetnic); return 0; } static struct v3_device_ops dev_ops = { - .free = vnet_nic_free, + .free = (int (*)(void *))vnet_nic_free, }; @@ -196,7 +199,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 +208,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; }