qapi: dealloc visitor, support freeing of nested lists
commit0b9d854230737b214c01e89f0b679ea36fd59e5e
authorMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 20 Sep 2011 00:03:10 +0000 (19 19:03 -0500)
committerLuiz Capitulino <lcapitulino@redhat.com>
Tue, 4 Oct 2011 14:00:46 +0000 (4 11:00 -0300)
tree8ef0b27702f10ba3ffb4a1264aa7419cc3c834cc
parent5cd5f0d059ecb9ce8cc214b5e7b8b6d473b50964
qapi: dealloc visitor, support freeing of nested lists

Previously our logic for keeping track of when we're visiting the head
of a list was done via a global bool. This can be overwritten if dealing
with nested lists, so use stack entries to track this instead.

Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
qapi/qapi-dealloc-visitor.c