提交 11a70602 编写于 作者: L Laine Stump

Avoid calling virStorageFileIsSharedFS with NULL

This code was just recently added (by me) and didn't account for the
fact that stdin_path is sometimes NULL. If it's NULL, and
SetSecurityAllLabel fails, a segfault would result.
上级 1c46f4cc
......@@ -3429,7 +3429,7 @@ static int qemudStartVMDaemon(virConnectPtr conn,
if (driver->securityDriver &&
driver->securityDriver->domainSetSecurityAllLabel &&
driver->securityDriver->domainSetSecurityAllLabel(vm, stdin_path) < 0) {
if (virStorageFileIsSharedFS(stdin_path) != 1)
if (stdin_path && virStorageFileIsSharedFS(stdin_path) != 1)
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册