VPP-1576: fix a set of coverity warnings
[vpp.git] / src / vlib / linux / vmbus.c
index a359c10..d0efbd7 100644 (file)
@@ -299,7 +299,10 @@ vlib_vmbus_bind_to_uio (vlib_vmbus_addr_t * addr)
       error = clib_sysfs_write ((char *) s, "%s", netvsc_uuid);
 
       if (error)
-       goto done;
+       {
+         close (fd);
+         goto done;
+       }
 
       uio_new_id_needed = 0;