diff --git a/ChangeLog b/ChangeLog index f504f0750f..6570f8886e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Sep 3 14:51:03 CEST 2008 Daniel Veillard + + * 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 * src/virsh.c: patch from Cole Robinson to add output on attach diff --git a/src/qemu_driver.c b/src/qemu_driver.c index eb4454a5a5..f71b6e8569 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -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; }