mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 21:34:54 +03: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 &&
|
||||
driver->securityDriver->domainSetSecurityAllLabel &&
|
||||
driver->securityDriver->domainSetSecurityAllLabel(vm, stdin_path) < 0) {
|
||||
if (virStorageFileIsSharedFS(stdin_path) != 1)
|
||||
if (stdin_path && virStorageFileIsSharedFS(stdin_path) != 1)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user