Re: [PATCH 10/13] qapi: Clean up visitor's recovery from input with invalid type

2020-04-24 Thread Markus Armbruster
Eric Blake writes: > On 4/23/20 1:06 PM, Eric Blake wrote: >> On 4/23/20 11:00 AM, Markus Armbruster wrote: >>> An alternate type's visit_type_FOO() fails when it runs into an >>> invalid ->type.  If it's an input visit, we then need to free the the >>> object we got from visit_start_alternate().

Re: [PATCH 10/13] qapi: Clean up visitor's recovery from input with invalid type

2020-04-23 Thread Eric Blake
On 4/23/20 1:06 PM, Eric Blake wrote: On 4/23/20 11:00 AM, Markus Armbruster wrote: An alternate type's visit_type_FOO() fails when it runs into an invalid ->type.  If it's an input visit, we then need to free the the object we got from visit_start_alternate().  We do that with qapi_free_FOO(),

Re: [PATCH 10/13] qapi: Clean up visitor's recovery from input with invalid type

2020-04-23 Thread Eric Blake
On 4/23/20 11:00 AM, Markus Armbruster wrote: An alternate type's visit_type_FOO() fails when it runs into an invalid ->type. If it's an input visit, we then need to free the the object we got from visit_start_alternate(). We do that with qapi_free_FOO(), which uses the dealloc visitor. Troubl

[PATCH 10/13] qapi: Clean up visitor's recovery from input with invalid type

2020-04-23 Thread Markus Armbruster
An alternate type's visit_type_FOO() fails when it runs into an invalid ->type. If it's an input visit, we then need to free the the object we got from visit_start_alternate(). We do that with qapi_free_FOO(), which uses the dealloc visitor. Trouble is that object is in a bad state: its ->type i