aboutsummaryrefslogtreecommitdiff
path: root/hw/sd
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2014-03-04 15:28:18 +0100
committerAndreas Färber <afaerber@suse.de>2014-03-12 20:13:02 +0100
commita01aedc8d32e6f5b08a4041b62be3c5fab7a3382 (patch)
tree747d980eee9fa1cc567ede14ed208c4685359593 /hw/sd
parent7b0309490cb108d881a0c66d6b350b4db7b3b4ac (diff)
downloadqemu-a01aedc8d32e6f5b08a4041b62be3c5fab7a3382.zip
qemu-a01aedc8d32e6f5b08a4041b62be3c5fab7a3382.tar.gz
qemu-a01aedc8d32e6f5b08a4041b62be3c5fab7a3382.tar.bz2
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>
Diffstat (limited to 'hw/sd')
0 files changed, 0 insertions, 0 deletions