mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-11-05 04:41:20 +00:00
Fix crash in LXC driver open method when URI has no path
If giving a lxc:// URI instead of lxc:/// the open method would crash ona NULL pointer * src/lxc/lxc_driver.c: Cope with a NULL URI path
This commit is contained in:
parent
823a684f8d
commit
658341189b
@ -126,7 +126,8 @@ static virDrvOpenStatus lxcOpen(virConnectPtr conn,
|
||||
return VIR_DRV_OPEN_DECLINED;
|
||||
|
||||
/* If path isn't '/' then they typoed, tell them correct path */
|
||||
if (STRNEQ(conn->uri->path, "/")) {
|
||||
if (conn->uri->path != NULL &&
|
||||
STRNEQ(conn->uri->path, "/")) {
|
||||
lxcError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("Unexpected LXC URI path '%s', try lxc:///"),
|
||||
conn->uri->path);
|
||||
|
Loading…
Reference in New Issue
Block a user