From: Laine Stump Date: Thu, 29 Jul 2010 13:41:33 +0000 (-0400) Subject: Eliminate memory leak in xenUnifiedDomainInfoListFree X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=1999e4f8f880c33307254096a01765594fdfd1d0;p=libvirt.git Eliminate memory leak in xenUnifiedDomainInfoListFree This fixes a leak described in https://bugzilla.redhat.com/show_bug.cgi?id=590073 xenUnifiedDomainInfoList has a pointer to a list of pointers to xenUnifiedDomain. We were freeing up all the domains, but neglecting to free the list. This was found by Paolo Bonzini . --- diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index d121ea4c3f..ddbfa7a3e4 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -2044,6 +2044,7 @@ xenUnifiedDomainInfoListFree(xenUnifiedDomainInfoListPtr list) VIR_FREE(list->doms[i]->name); VIR_FREE(list->doms[i]); } + VIR_FREE(list->doms); VIR_FREE(list); }