On 14/01/2025 8:12 am, Jan Beulich wrote:
> The ssid_label field requires separate freeing; make sure to call
> libxl_dominfo_dispose(). And then, for good measure, also
> libxl_dominfo_init().
>
> Coverity-ID: 1638727
> Coverity-ID: 1638728
> Fixes: c458c404da16 ("xl: use libxl_domain_info to get the uuid in 
> printf_info")
> Fixes: 48dab9767d2e ("tools/xl: use libxl_domain_info to get domain type for 
> vcpu-pin")
> Signed-off-by: Jan Beulich <jbeul...@suse.com>
> ---
> I wasn't quite sure about use of libxl_dominfo_init(): vcpuset(), for
> example, doesn't call it.

It's a written requirement (somewhere) that *_init() and *_dispose() do
get called.

Except everyone's lazy with them and plenty of scenarios function
without, which is why it's often Coverity telling us about it (but only
for the instances where there's a real malloc()/free() gone missing).

I expect it would be better to extend this patch to fix up vcpuset()
too.  The changes so far LGTM.

~Andrew

Reply via email to