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>
This commit is contained in:
Matthew Daley authored and Ian Campbell committed 2013-10-03 14:06:43 +01:00
1 parent c8f5eb4b80
commit c827d7f39f
1 file changed
+3 -3
+3 -3
View File
@@ -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) )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.