提交 53738f83 编写于 作者: D Daniel Veillard

avoid a segfault on CD eject in KVM/QEmu

* src/qemu_driver.c: patch from Cole Robinson to avoid a segfault
  on KVM CD eject
Daniel
上级 54a4f8d4
Wed Sep 3 14:51:03 CEST 2008 Daniel Veillard <veillard@redhat.com>
* src/qemu_driver.c: patch from Cole Robinson to avoid a segfault
on KVM CD eject
Wed Sep 3 14:37:06 CEST 2008 Daniel Veillard <veillard@redhat.com> Wed Sep 3 14:37:06 CEST 2008 Daniel Veillard <veillard@redhat.com>
* src/virsh.c: patch from Cole Robinson to add output on attach * src/virsh.c: patch from Cole Robinson to add output on attach
......
...@@ -2974,7 +2974,10 @@ static int qemudDomainChangeCDROM(virDomainPtr dom, ...@@ -2974,7 +2974,10 @@ static int qemudDomainChangeCDROM(virDomainPtr dom,
} }
VIR_FREE(reply); VIR_FREE(reply);
VIR_FREE(cmd); VIR_FREE(cmd);
strcpy(olddisk->src, newdisk->src);
VIR_FREE(olddisk->src);
olddisk->src = newdisk->src;
newdisk->src = NULL;
olddisk->type = newdisk->type; olddisk->type = newdisk->type;
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册