Statistics
| Branch: | Revision:

root / qapi / qapi-dealloc-visitor.c @ feature-archipelago

History | View | Annotate | Download (4.9 kB)

# Date Author Comment
25a70175 03/03/2014 06:17 pm Markus Armbruster

qapi: Clean up superfluous null check in qapi_dealloc_type_str()

Argument can't be null. No other Visitor method type_str() checks for
null.

Signed-off-by: Markus Armbruster <>
Reviewed-by: Eric Blake <>
Signed-off-by: Luiz Capitulino <>

3dce9cad 11/06/2013 05:58 am Wenchao Xia

qapi: fix memleak by adding implict struct functions in dealloc visitor

Otherwise member "base" is leaked in a qapi_free_STRUCTURE() call.

Signed-off-by: Wenchao Xia <>
Reviewed-by: Eric Blake <>
Message-id: ...

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

7b1b5d19 12/19/2012 09:31 am Paolo Bonzini

qapi: move include files to include/qobject/

Signed-off-by: Paolo Bonzini <>

4167c42c 12/19/2012 09:31 am Paolo Bonzini

qapi: remove qapi/qapi-types-core.h

The file is only including error.h and qerror.h. Prefer explicit
inclusion of whatever files are needed.
Signed-off-by: Paolo Bonzini <>

1d162526 11/29/2012 03:05 pm Bruce Rogers

qapi: fix qapi_dealloc_type_size parameter type

The second parameter to qapi_dealloc_type_size should be a uint64_t *,
not a size_t *. This was causing our 32 bit x86 build to fail, since
warnings are treated as errors.

Signed-off-by: Bruce Rogers <>...

0c26f2ec 11/26/2012 10:25 pm Stefan Hajnoczi

qapi: handle visitor->type_size() in QapiDeallocVisitor

visit_type_size() requires either visitor->type_size() or
visitor_uint64() to be implemented, otherwise a NULL function pointer is
invoked.

It is possible to trigger this crash as follows:

$ qemu-system-x86_64 -netdev tap,sndbuf=0,id=netdev0 \...
5666dd19 10/04/2011 05:00 pm Michael Roth

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...

0b9d8542 10/04/2011 05:00 pm Michael Roth

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....

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

d5f3c29c 07/21/2011 10:48 pm Michael Roth

qapi: add QAPI dealloc visitor

Type of Visitor class that can be passed into a qapi-generated C
type's visitor function to free() any heap-allocated data types.

Signed-off-by: Michael Roth <>
Signed-off-by: Luiz Capitulino <>