aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMatthew Daley <mattjd@gmail.com>2013-09-29 14:35:02 +1300
committerIan Campbell <ian.campbell@citrix.com>2013-10-03 14:06:43 +0100
commitc827d7f39f7a184ed73e435237bbba54d4272bc1 (patch)
tree11af67aad7066729a2a7a42fb9c3a3f3f62d738d /tools
parentc8f5eb4b8093ac6acc947a4df5779e69005d16c4 (diff)
downloadxen-c827d7f39f7a184ed73e435237bbba54d4272bc1.tar.gz
xen-c827d7f39f7a184ed73e435237bbba54d4272bc1.tar.bz2
xen-c827d7f39f7a184ed73e435237bbba54d4272bc1.zip
libxc: only munmap when something has actually been mapped in change_pte
Coverity-ID: 1055269 signed-off-by: Matthew Daley <mattjd@gmail.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/libxc/xc_offline_page.c6
1 files changed, 3 insertions, 3 deletions
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) )