KR> Yep, good call. Although, if we fall through here, we run into
KR> problems with the (*dominfo)->dev_mem_ct = get_mem_devices(dom,
KR> &(*dominfo)->dev_mem); related pieces since dominfo is NULL.
Sorry, I didn't have the full context.
I think it's bad form to cleanup in multiple exit paths. How about
moving the free(xml) to the end, and adding an "out" label right
before it. Then you can free(dominfo), set it to NULL, and goto out
to free(xml) and return ret, which will be zero, signalling error to
the caller. That would fit better with how we handle error paths
elsewhere in the code.
KR> We need to capture ret from get_domain().
Ah, right, okay, I see it now. Again, I wasn't looking at the context
of the rest of the file :)
Thanks!
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms(a)us.ibm.com