提交 2e6bad31 编写于 作者: J Jim Meyering

storage_backend_fs: avoid NULL dereference on opendir failure

* src/storage_backend_fs.c (virStorageBackendFileSystemRefresh):
Don't call closedir on a NULL pointer.
上级 da482fe1
......@@ -983,7 +983,8 @@ no_memory:
/* fallthrough */
cleanup:
closedir(dir);
if (dir)
closedir(dir);
virStorageVolDefFree(vol);
virStoragePoolObjClearVols(pool);
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册