On 07/20/2017 04:52 AM, Markus Armbruster wrote: > Eric Blake <ebl...@redhat.com> writes: > >> Add a test that proves (at least when run under valgrind) that >> we are correctly handling allocated memory even when a visit >> is aborted in the middle for whatever other reason. >> >> See commit f24582d "qapi: fix double free in >> qmp_output_visitor_cleanup()" for a fix that was lacking >> testsuite exposure prior to this patch. >>
>> + >> + /* >> + * Abort in the middle of an alternate. Alternates can't be >> + * virtually visited, so we get to inline the first half of >> + * visit_type_UserDefAlternate(). >> + */ > > Not exactly inline. Perhaps: > > /* > * Abort in the middle of an alternate. Since alternates don't > * support virtual visits, we perform a real one, similar to what > * visit_type_UserDefAlternate() would do. > */ Sounds reasonable, if we go with it. > > Hmm, what would visit_type_UserDefAlternate() do for @uda? Could we > simply call it here and be done? Sounds even better; I'll do that for v2. -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature