提交 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"
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册