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

[Xen-changelog] [xen master] tools/libxc: Don't leak foreign mappings when loading modules



commit 2cb3a419324f763b3856e49798603de208af0800
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Sep 30 11:01:03 2016 +0100
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Fri Sep 30 12:16:57 2016 +0100

    tools/libxc: Don't leak foreign mappings when loading modules
    
    Spotted by Coverity
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/libxc/xc_dom_core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/libxc/xc_dom_core.c b/tools/libxc/xc_dom_core.c
index 5326d36..e177667 100644
--- a/tools/libxc/xc_dom_core.c
+++ b/tools/libxc/xc_dom_core.c
@@ -1119,6 +1119,7 @@ static int xc_dom_load_acpi(struct xc_dom_image *dom)
         }
 
         memcpy(ptr, dom->acpi_modules[i].data, dom->acpi_modules[i].length);
+        munmap(ptr, XC_PAGE_SIZE * num_pages);
 
         free(extents);
         i++;
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

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