On 07/15/2016 12:56 AM, Xiao Guangrong wrote: >>> Note that you don't have to call visit_next_list() in a virtual visit. >>> For an example, see prop_get_fdt(). Good enough already? >> >> Yes, definitely! I'm queueing Guangrong's patch because it fixes a >> crash and the leak existed before, but without next_list we can indeed >> visit a "virtual" list and fix the leak. It can be done during the -rc >> period. > > So you want to build uint16List list and save it as a "virtual" list in > host_memory_backend_get_host_nodes(), then its caller can directly fetch > this 'virtual' list from the visit? With a virtual list visit, you don't even need a uint16List object. Merely call visit_start_list(NULL) to start the list with no matching uint16List, then visit_type_int16() for each list element (note no visit_next_list() calls), then visit_end_list(). -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature