From: Jiri Denemark Date: Thu, 25 Feb 2016 11:50:12 +0000 (+0100) Subject: util: Avoid calling closedir(NULL) X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=04e10925a141771eaff2733f36f344074bb7342d;p=libvirt.git util: Avoid calling closedir(NULL) Signed-off-by: Jiri Denemark --- diff --git a/src/util/virnetdev.c b/src/util/virnetdev.c index ea955524fd..5c79c422e1 100644 --- a/src/util/virnetdev.c +++ b/src/util/virnetdev.c @@ -3119,7 +3119,7 @@ virNetDevRDMAFeature(const char *ifname, virReportSystemError(errno, _("Failed to opendir path '%s'"), SYSFS_INFINIBAND_DIR); - goto cleanup; + return -1; } if (virAsprintf(ð_devpath, SYSFS_NET_DIR "%s/device/resource", ifname) < 0)