xemu/qom
Stefan Hajnoczi 7e42cd6f35 qom: Avoid leaking str and bool properties on failure
When object_property_add_str() and object_property_add_bool() fail, they
leak their internal StringProperty and BoolProperty structs.  Remember
to free the structs on error.

Luckily this is a low-impact memory leak since most QOM properties are
static qdev properties that will never take the error case.
object_property_add() only fails if the property name is already in use.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
(cherry picked from commit a01aedc8d3)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2014-06-25 15:11:17 -05:00
..
Makefile.objs build: remove universal-obj-y 2013-01-26 13:15:35 +00:00
container.c Make all static TypeInfos const 2013-01-10 15:11:53 -06:00
cpu.c cpu: Move cpu state syncs up into cpu_dump_state() 2013-09-20 12:37:52 +02:00
object.c qom: Avoid leaking str and bool properties on failure 2014-06-25 15:11:17 -05:00
qom-qobject.c qom: move include files to include/qom/ 2012-12-19 08:31:32 +01:00