From: Stephen Hemminger Date: Mon, 6 Aug 2018 18:11:06 +0000 (-0700) Subject: bus/vmbus: close directory in error path X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=bca88be88a6fbfe5bc108693444d2ede5b23bf2b;p=dpdk.git bus/vmbus: close directory in error path Fix bug reported by Coverity where directory being scanned was not closed in error path (leaking file descriptor). Coverity issue: 302848 Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support") Signed-off-by: Stephen Hemminger --- diff --git a/drivers/bus/vmbus/linux/vmbus_uio.c b/drivers/bus/vmbus/linux/vmbus_uio.c index b0f8ebaea6..0b1b153cc0 100644 --- a/drivers/bus/vmbus/linux/vmbus_uio.c +++ b/drivers/bus/vmbus/linux/vmbus_uio.c @@ -357,6 +357,7 @@ int vmbus_uio_get_subchan(struct vmbus_channel *primary, if (err) { VMBUS_LOG(NOTICE, "invalid subchannel id %lu", subid); + closedir(chan_dir); return err; }