qemu-e2k/qapi
Michael Roth 5666dd19dd 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>
2011-10-04 11:00:46 -03:00
..
qapi-dealloc-visitor.c qapi: dealloc visitor, fix premature free and iteration logic 2011-10-04 11:00:46 -03:00
qapi-dealloc-visitor.h qapi: add QAPI dealloc visitor 2011-07-21 16:48:13 -03:00
qapi-types-core.h qapi: add code generation support for middle mode 2011-10-04 11:00:46 -03:00
qapi-visit-core.c
qapi-visit-core.h
qmp-core.h qapi: add QMP dispatch functions 2011-07-21 16:48:14 -03:00
qmp-dispatch.c qapi: add QMP dispatch functions 2011-07-21 16:48:14 -03:00
qmp-input-visitor.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
qmp-input-visitor.h
qmp-output-visitor.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00
qmp-output-visitor.h qapi: add QMP output visitor 2011-07-21 16:48:13 -03:00
qmp-registry.c Use glib memory allocation and free functions 2011-08-20 23:01:08 -05:00