[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] tools/libxc: Fix memory leaks in xc_domain_restore()



# HG changeset patch
# User Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
# Date 1371832526 -3600
# Node ID cec58839d6eff0ac27de3827af8fc969db554172
# Parent  803ad8977a817263ea826bac1bb68c0dd57fac9c
tools/libxc: Fix memory leaks in xc_domain_restore()

Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

---

George: I believe these qualify under #2 for inclusion into 4.3

Ian: These should be backported to 4.2 and 4.1

I will have a patch against xc_domain_save() soon, but it is proving more
difficult and I am not certain I will have time to finish it soon.

diff -r 803ad8977a81 -r cec58839d6ef tools/libxc/xc_domain_restore.c
--- a/tools/libxc/xc_domain_restore.c
+++ b/tools/libxc/xc_domain_restore.c
@@ -2335,6 +2335,9 @@ int xc_domain_restore(xc_interface *xch,
     free(mmu);
     free(ctx->p2m);
     free(pfn_type);
+    free(region_mfn);
+    free(ctx->p2m_batch);
+    pagebuf_free(&pagebuf);
     tailbuf_free(&tailbuf);
 
     /* discard cache for save file  */

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.