devices: virtio pci leaking spinlock 34/20334/3
authorSteven Luong <sluong@cisco.com>
Tue, 25 Jun 2019 20:47:06 +0000 (13:47 -0700)
committerDamjan Marion <dmarion@me.com>
Sat, 29 Jun 2019 07:38:32 +0000 (07:38 +0000)
Memory is dirt cheap. But there is no need to throw it away.

Type: fix

Change-Id: I155130ab3c435b1c04d7c0e9f54795b8de9383d9
Signed-off-by: Steven Luong <sluong@cisco.com>
src/vnet/devices/virtio/pci.c

index f53552a..1acbb32 100644 (file)
@@ -1298,6 +1298,7 @@ virtio_pci_delete_if (vlib_main_t * vm, virtio_if_t * vif)
        virtio_free_used_desc (vm, vring);
       }
     vec_free (vring->buffers);
+    clib_spinlock_free (&vring->lockp);
     vlib_physmem_free (vm, vring->desc);
   }