From: Matthew Daley Date: Wed, 30 Oct 2013 07:51:39 +0000 (+1300) Subject: libxc: fix memory leak in move_l3_below_4G error handling X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6109 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=9fae04ff00231e9a1696952b4ef882b9f2309389;p=xen.git libxc: fix memory leak in move_l3_below_4G error handling ...otherwise mmu gets leaked. Coverity-ID: 1055844 Signed-off-by: Matthew Daley Reviewed-by: Andrew Cooper Acked-by: Ian Campbell --- diff --git a/tools/libxc/xc_dom_x86.c b/tools/libxc/xc_dom_x86.c index 7cc2ff2411..60fc5442ce 100644 --- a/tools/libxc/xc_dom_x86.c +++ b/tools/libxc/xc_dom_x86.c @@ -220,7 +220,7 @@ static xen_pfn_t move_l3_below_4G(struct xc_dom_image *dom, { DOMPRINTF("%s: xc_dom_pfn_to_ptr(dom, l3pfn, 1) => NULL", __FUNCTION__); - return l3mfn; /* our one call site will call xc_dom_panic and fail */ + goto out; /* our one call site will call xc_dom_panic and fail */ } memset(l3tab, 0, XC_DOM_PAGE_SIZE(dom));