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
This commit is contained in:
Daniel Veillard 2008-09-03 12:52:27 +00:00
parent 54a4f8d44d
commit 53738f83a5
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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>
* src/virsh.c: patch from Cole Robinson to add output on attach

View File

@ -2974,7 +2974,10 @@ static int qemudDomainChangeCDROM(virDomainPtr dom,
}
VIR_FREE(reply);
VIR_FREE(cmd);
strcpy(olddisk->src, newdisk->src);
VIR_FREE(olddisk->src);
olddisk->src = newdisk->src;
newdisk->src = NULL;
olddisk->type = newdisk->type;
return 0;
}