mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-04 07:53:50 +00:00
Fix crash in virsh connect command
This commit is contained in:
parent
e9371d1a46
commit
d042d339d1
@ -1,3 +1,8 @@
|
|||||||
|
Mon Jan 22 15:41:52 EST 2007 Daniel Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
|
* src/virsh.c: Fix crash in 'connect' command by ensuring
|
||||||
|
we always strdup the connection URI string.
|
||||||
|
|
||||||
Mon Jan 22 16:23:52 IST 2007 Mark McLoughlin <markmc@redhat.com>
|
Mon Jan 22 16:23:52 IST 2007 Mark McLoughlin <markmc@redhat.com>
|
||||||
|
|
||||||
* src/internal.h: virDomain.handle refers to the "id"
|
* src/internal.h: virDomain.handle refers to the "id"
|
||||||
|
@ -292,7 +292,7 @@ cmdConnect(vshControl * ctl, vshCmd * cmd)
|
|||||||
|
|
||||||
if (ctl->name)
|
if (ctl->name)
|
||||||
free(ctl->name);
|
free(ctl->name);
|
||||||
ctl->name = vshCommandOptString(cmd, "name", NULL);
|
ctl->name = vshStrdup(ctl, vshCommandOptString(cmd, "name", NULL));
|
||||||
|
|
||||||
if (!ro)
|
if (!ro)
|
||||||
ctl->conn = virConnectOpen(ctl->name);
|
ctl->conn = virConnectOpen(ctl->name);
|
||||||
|
Loading…
Reference in New Issue
Block a user