Re: [Qemu-devel] [PATCH] usb: fix usb_qdev_init() error handling again

2011-12-15 Thread Anthony Liguori
On 12/15/2011 04:05 AM, Stefan Hajnoczi wrote: Commit f462141f18ffdd75847f6459ef83d90b831d12c0 introduced clean up code when usb_qdev_init() fails. Unfortunately it calls .handle_destroy() when .init() was never invoked or failed. This can lead to crashes when .handle_destroy() tries to clean u

[Qemu-devel] [PATCH] usb: fix usb_qdev_init() error handling again

2011-12-15 Thread Stefan Hajnoczi
Commit f462141f18ffdd75847f6459ef83d90b831d12c0 introduced clean up code when usb_qdev_init() fails. Unfortunately it calls .handle_destroy() when .init() was never invoked or failed. This can lead to crashes when .handle_destroy() tries to clean up things that were never initialized. This patch