util: Avoid calling closedir(NULL)

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Jiri Denemark 2014-11-24 17:37:13 +01:00
parent 7296e896c9
commit f37627ee72

View File

@ -1780,7 +1780,7 @@ virFindSCSIHostByPCI(const char *sysfs_prefix,
virReportSystemError(errno,
_("Failed to opendir path '%s'"),
prefix);
goto cleanup;
return NULL;
}
while (virDirRead(dir, &entry, prefix) > 0) {