qemu-patch-raspberry4/qom
Stefan Hajnoczi a01aedc8d3 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>
2014-03-12 20:13:02 +01:00
..
container.c Make all static TypeInfos const 2013-01-10 15:11:53 -06:00
cpu.c cpu: Document why cannot_instantiate_with_device_add_yet 2013-12-23 00:27:22 +01:00
Makefile.objs add optional 2nd stage initialization to -object/object-add commands 2014-01-28 12:47:02 -05:00
object.c qom: Avoid leaking str and bool properties on failure 2014-03-12 20:13:02 +01:00
object_interfaces.c add optional 2nd stage initialization to -object/object-add commands 2014-01-28 12:47:02 -05:00
qom-qobject.c qom: move include files to include/qom/ 2012-12-19 08:31:32 +01:00