
KR> ret = _get_dominfo(xml, *dominfo); KR> + if (!ret) { KR> + free(*dominfo); KR> + *dominfo = NULL; KR> + return 0; KR> + } KR> + KR> free(xml); You've just introduced a memory leak here, since xml won't get free()'d. Just remove the "return 0" and let it fall through and it should be fine. KR> diff -r 4ceb57b4430b -r f29660709900 src/Virt_VSSD.c KR> --- a/src/Virt_VSSD.c Mon Nov 12 13:54:53 2007 -0800 KR> +++ b/src/Virt_VSSD.c Mon Nov 12 16:15:41 2007 -0800 KR> @@ -45,7 +45,8 @@ static int instance_from_dom(virDomainPt KR> CMPIObjectPath *op; KR> struct domain *dominfo = NULL; KR> - if (!get_dominfo(dom, &dominfo)) KR> + ret = get_dominfo(dom, &dominfo); KR> + if (!ret) KR> goto out; Maybe my eyes are tired at the end of the day, but does this fix anything or is it just a style change? -- Dan Smith IBM Linux Technology Center Open Hypervisor Team email: danms@us.ibm.com