aboutsummaryrefslogtreecommitdiff
path: root/qemu-os-posix.h
diff options
context:
space:
mode:
authorMichael Roth <mdroth@linux.vnet.ibm.com>2011-09-15 14:39:52 -0500
committerLuiz Capitulino <lcapitulino@redhat.com>2011-10-04 11:00:46 -0300
commit5666dd19dd95d966be00d0c3e7efdfaecc096ff3 (patch)
tree034ac3fd5d50ef4058c58e879e5aceba327ecab4 /qemu-os-posix.h
parent15e43e64b6bac61811e829634ee048e8de4c976d (diff)
qapi: dealloc visitor, fix premature free and iteration logic
Currently we do 3 things wrong: 1) The list iterator, in practice, is used in a manner where the pointer we pass in is the same as the pointer we assign the output to from visit_next_list(). This causes an infinite loop where we keep freeing the same structures. 2) We attempt to free list->value rather than list. visit_type_<type> handles this. We should only be concerned with the containing list. 3) We free prematurely: iterator function will continue accessing values we've already freed. This patch should fix all of these issues. QmpOutputVisitor also suffers from 1). 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>
Diffstat (limited to 'qemu-os-posix.h')
0 files changed, 0 insertions, 0 deletions