X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=linux_module%2Fiface-host-dev.c;fp=linux_module%2Fiface-host-dev.c;h=86b0e0c66365577d977c165a7b65bbd1a22ed363;hb=1f8ac11d4550b1113d9a8c23e62b236cb8ad8404;hp=6edc26bb3dc4dc92f124d68ab49a253e98a4ed69;hpb=0ab9a336e36f49b43d9918c09087c6826ce04c83;p=palacios.git diff --git a/linux_module/iface-host-dev.c b/linux_module/iface-host-dev.c index 6edc26b..86b0e0c 100644 --- a/linux_module/iface-host-dev.c +++ b/linux_module/iface-host-dev.c @@ -839,6 +839,8 @@ static int palacios_host_dev_close(v3_host_dev_t hostdev) palacios_spinlock_unlock_irqrestore(&(dev->lock),f2); palacios_spinlock_unlock_irqrestore(&(host_dev->lock),f1); + palacios_spinlock_deinit(&(dev->lock)); + palacios_host_dev_user_free(dev); return 0; @@ -1343,7 +1345,9 @@ static int host_dev_guest_init(struct v3_guest * guest, void ** vm_data ) { static int host_dev_guest_deinit(struct v3_guest * guest, void * vm_data) { - palacios_free(vm_data); + struct palacios_host_dev * host_dev = (struct palacios_host_dev *) vm_data; + palacios_spinlock_deinit(&(host_dev->lock)); + palacios_free(host_dev); return 0; }