]> git.ipfire.org Git - thirdparty/qemu.git/commit
qapi: dealloc visitor, implement visit_start_union
authorMichael Roth <mdroth@linux.vnet.ibm.com>
Thu, 18 Sep 2014 20:36:41 +0000 (15:36 -0500)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Sun, 4 Jan 2015 19:44:04 +0000 (13:44 -0600)
commit4a58f3c2d8acceaefeeffe5a9d3a9acd5cbe08b6
tree3331be446c7b103cfb7b7e75dce709b72f64e719
parent96c6cf6d30444aa6d68737949dccac03676d1a34
qapi: dealloc visitor, implement visit_start_union

If the .data field of a QAPI Union is NULL, we don't need to free
any of the union fields.

Make use of the new visit_start_union interface to access this
information and instruct the generated code to not visit these
fields when this occurs.

Cc: qemu-stable@nongnu.org
Reported-by: Fam Zheng <famz@redhat.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
(cherry picked from commit 146db9f91979db89a123ea10d2b825d3670d2b36)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qapi/qapi-dealloc-visitor.c