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

[Xen-devel] [PATCH 03/28] libxc: move munmap into the loop it's needed in in change_pte



Coverity-ID: 1055269
Signed-off-by: Matthew Daley <mattjd@xxxxxxxxx>
---
 tools/libxc/xc_offline_page.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/libxc/xc_offline_page.c b/tools/libxc/xc_offline_page.c
index fbb53f5..8195efb 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) )
-- 
1.7.10.4


_______________________________________________
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®.