提交 d042d339 编写于 作者: D Daniel P. Berrange

Fix crash in virsh connect command

上级 e9371d1a
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.
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册