mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 06:35:24 +00:00
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:
parent
da482fe1dd
commit
2e6bad311d
@ -983,7 +983,8 @@ no_memory:
|
||||
/* fallthrough */
|
||||
|
||||
cleanup:
|
||||
closedir(dir);
|
||||
if (dir)
|
||||
closedir(dir);
|
||||
virStorageVolDefFree(vol);
|
||||
virStoragePoolObjClearVols(pool);
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user