mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: fix crash in qemuOpen
If the path part of connection URI is not present, cfg is used unitialized. https://bugzilla.redhat.com/show_bug.cgi?id=950855 (cherry picked from commit 74bff2509080912ea8abf1de8fd95fa2412b659a)
This commit is contained in:
parent
9bf6bec44e
commit
d2fb515e4d
@ -1016,6 +1016,7 @@ static virDrvOpenStatus qemuOpen(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
cfg = virQEMUDriverGetConfig(qemu_driver);
|
||||
if (conn->uri->path == NULL) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("no QEMU URI path given, try %s"),
|
||||
@ -1023,7 +1024,6 @@ static virDrvOpenStatus qemuOpen(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
cfg = virQEMUDriverGetConfig(qemu_driver);
|
||||
if (cfg->privileged) {
|
||||
if (STRNEQ(conn->uri->path, "/system") &&
|
||||
STRNEQ(conn->uri->path, "/session")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user