From: Matthew Daley Date: Sun, 29 Sep 2013 01:35:02 +0000 (+1300) Subject: libxc: only munmap when something has actually been mapped in change_pte X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6223 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=c827d7f39f7a184ed73e435237bbba54d4272bc1;p=xen.git libxc: only munmap when something has actually been mapped in change_pte Coverity-ID: 1055269 signed-off-by: Matthew Daley Acked-by: Ian Campbell --- diff --git a/tools/libxc/xc_offline_page.c b/tools/libxc/xc_offline_page.c index fbb53f5f0f..8195efb952 100644 --- a/tools/libxc/xc_offline_page.c +++ b/tools/libxc/xc_offline_page.c @@ -317,10 +317,10 @@ static int change_pte(xc_interface *xch, int domid, goto failed; } } - } - munmap(content, PAGE_SIZE); - content = NULL; + munmap(content, PAGE_SIZE); + content = NULL; + } } if ( xc_flush_mmu_updates(xch, mmu) )