]> xenbits.xensource.com Git - libvirt.git/commitdiff
Eliminate memory leak in xenUnifiedDomainInfoListFree
authorLaine Stump <laine@redhat.com>
Thu, 29 Jul 2010 13:41:33 +0000 (09:41 -0400)
committerLaine Stump <laine@laine.org>
Thu, 29 Jul 2010 16:25:24 +0000 (12:25 -0400)
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 <pbonzini@redhat.com>.

src/xen/xen_driver.c

index d121ea4c3f048dc36df9f3f9ffb0379d24e3192e..ddbfa7a3e4f253854d0680140b545897712c9f45 100644 (file)
@@ -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);
 }