mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-08 12:41:29 +00:00
qemu driver: Fix segfault in libvirt/libvirtd when uri->path is NULL.
See also: https://bugzilla.redhat.com/show_bug.cgi?id=545400#c1
This commit is contained in:
parent
51ea18a844
commit
c11a82b62a
@ -2651,6 +2651,15 @@ static virDrvOpenStatus qemudOpen(virConnectPtr conn,
|
|||||||
return VIR_DRV_OPEN_ERROR;
|
return VIR_DRV_OPEN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (conn->uri->path == NULL) {
|
||||||
|
qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR,
|
||||||
|
_("no QEMU URI path given, try %s"),
|
||||||
|
qemu_driver->privileged
|
||||||
|
? "qemu:///system"
|
||||||
|
: "qemu:///session");
|
||||||
|
return VIR_DRV_OPEN_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
if (qemu_driver->privileged) {
|
if (qemu_driver->privileged) {
|
||||||
if (STRNEQ (conn->uri->path, "/system") &&
|
if (STRNEQ (conn->uri->path, "/system") &&
|
||||||
STRNEQ (conn->uri->path, "/session")) {
|
STRNEQ (conn->uri->path, "/session")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user