1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03:00

Fix crash in virsh connect command

This commit is contained in:
Daniel P. Berrange 2007-01-22 20:43:02 +00:00
parent e9371d1a46
commit d042d339d1
2 changed files with 7 additions and 2 deletions

View File

@ -1,9 +1,14 @@
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>
* src/internal.h: virDomain.handle refers to the "id"
in the API, so re-name to virDomain.id to avoid
confusion.
* src/hash.c, src/libvirt.c, src/proxy_internal.c, src/test.c,
src/xen_internal.c, src/xend_internal.c, src/xm_internal.c,
src/xml.c, src/xs_internal.c: update for rename.

View File

@ -292,7 +292,7 @@ cmdConnect(vshControl * ctl, vshCmd * cmd)
if (ctl->name)
free(ctl->name);
ctl->name = vshCommandOptString(cmd, "name", NULL);
ctl->name = vshStrdup(ctl, vshCommandOptString(cmd, "name", NULL));
if (!ro)
ctl->conn = virConnectOpen(ctl->name);