]> git.proxmox.com Git - mirror_qemu.git/commit
qapi: allow freeing partially-allocated objects
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 22 Mar 2012 11:51:07 +0000 (12:51 +0100)
committerLuiz Capitulino <lcapitulino@redhat.com>
Tue, 27 Mar 2012 12:14:06 +0000 (09:14 -0300)
commit69b50071d8dc1b4e06724bb73cda8e2f10fe30c7
tree1ae6144a524792cba5f5817382a77d8d1aafde2f
parentb6f0474fc0fe6f81d93d620a5d24bc30b22d561b
qapi: allow freeing partially-allocated objects

Objects going through the dealloc visitor can be only partially allocated.
Detect the situation and avoid a segfault.  This also helps with the
input visitor, when there are errors.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
scripts/qapi-visit.py