qdev: Free opts on failed do_device_add
authorKevin Wolf <kwolf@redhat.com>
Tue, 16 Feb 2010 12:12:38 +0000 (13:12 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 19 Feb 2010 21:53:54 +0000 (15:53 -0600)
commit48593ff85a9fa3b7b4cbd4a4aa4608788b43c985
tree18f958f9bd487a54fa8f6dc9d6e89667470464fc
parent787ff23abdd35450beac7a64f28acd0c6d70f5c5
qdev: Free opts on failed do_device_add

If the device can't be created, don't leak the QemuOpts and release the id of
the device that should have been added by the failed device_add.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
hw/qdev.c