libxl: generate a _dispose function for all Aggregate types
Don't special case types which we happen to know do not contain allocated data
such that in the future if this changes we do not need to add an API. Although
there is likely to be latent bugs in callers due to this having the API in old
libraries mean that when callers are fixed they will not need to make special
arrangements to handle old and new versions of the library.
Adds dispose functions for:
- libxl_dominfo
- libxl_cpupoolinfo
- libxl_physinfo
- libxl_sched_credit
- libxl_sched_credit2
I have attempted to fix any latent bugs in xl by inspection but have not
bothered with libxl (on the basis that internally the library is allowed to
make these sorts of assumptions and because it was looking like a very invasive
job and that more would only creep in anyway).
Several callsites use libxl_domain_info to check for the presence of a domain
and throw away the actual info. As a convenience accept a NULL info pointer and
just return the status.
Also fix a memory leak in libxl_domain_list.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>