qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL 12/18] linux-user: init_guest_space: Clean up if we c


From: Laurent Vivier
Subject: [Qemu-devel] [PULL 12/18] linux-user: init_guest_space: Clean up if we can't initialize the commpage
Date: Tue, 13 Mar 2018 18:33:49 +0100

From: Luke Shumaker <address@hidden>

We'll just exit with an error anyway, so it doesn't really matter, but it
is cleaned up in all of the other places were we error out.

Signed-off-by: Luke Shumaker <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Laurent Vivier <address@hidden>
---
 linux-user/elfload.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index eaa52afe79..dcdd756908 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1860,6 +1860,7 @@ unsigned long init_guest_space(unsigned long host_start,
             if (valid == 1) {
                 break;
             } else if (valid == -1) {
+                munmap((void *)real_start, host_size);
                 return (unsigned long)-1;
             }
             /* valid == 0, so try again. */
-- 
2.14.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]