mirror of https://gitee.com/openkylin/libvirt.git
virt-admin: Fix segfault when libvirtd dies
vshAdmCatchDisconnect requires non-NULL structure vshControl for getting connection name (stored at opaque), but virAdmConnectRegisterCloseCallback at vshAdmConnect called it with NULL. Signed-off-by: Adam Julis <ajulis@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a7e258d7c9
commit
478774eada
|
@ -112,7 +112,7 @@ vshAdmConnect(vshControl *ctl, unsigned int flags)
|
|||
return -1;
|
||||
} else {
|
||||
if (virAdmConnectRegisterCloseCallback(priv->conn, vshAdmCatchDisconnect,
|
||||
NULL, NULL) < 0)
|
||||
ctl, NULL) < 0)
|
||||
vshError(ctl, "%s", _("Unable to register disconnect callback"));
|
||||
|
||||
if (priv->wantReconnect)
|
||||
|
|
Loading…
Reference in New Issue