mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-09 05:01:28 +00:00
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.
This commit is contained in:
parent
1c46f4cc03
commit
11a7060250
@ -3429,7 +3429,7 @@ static int qemudStartVMDaemon(virConnectPtr conn,
|
|||||||
if (driver->securityDriver &&
|
if (driver->securityDriver &&
|
||||||
driver->securityDriver->domainSetSecurityAllLabel &&
|
driver->securityDriver->domainSetSecurityAllLabel &&
|
||||||
driver->securityDriver->domainSetSecurityAllLabel(vm, stdin_path) < 0) {
|
driver->securityDriver->domainSetSecurityAllLabel(vm, stdin_path) < 0) {
|
||||||
if (virStorageFileIsSharedFS(stdin_path) != 1)
|
if (stdin_path && virStorageFileIsSharedFS(stdin_path) != 1)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user