storage_backend_fs: avoid NULL dereference on opendir failure

* src/storage_backend_fs.c (virStorageBackendFileSystemRefresh):
Don't call closedir on a NULL pointer.
This commit is contained in:
Jim Meyering 2009-09-02 09:42:32 +02:00
parent da482fe1dd
commit 2e6bad311d

View File

@ -983,6 +983,7 @@ no_memory:
/* fallthrough */
cleanup:
if (dir)
closedir(dir);
virStorageVolDefFree(vol);
virStoragePoolObjClearVols(pool);