diff options
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-12-28 13:08:06 -0500 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2018-03-09 21:24:22 +0100 |
commit | f2024817548f9538cbe626f88ca9f37ff0f5d468 (patch) | |
tree | 75e97a62c0406e7d73720ad83a3ff76d83fdfc74 /linux-user | |
parent | c3637eaf61c9c4a74edaa078599f349eeefa49c6 (diff) |
linux-user: init_guest_space: Clean up if we can't initialize the commpage
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 <lukeshu@parabola.nu>
Message-Id: <20171228180814.9749-4-lukeshu@lukeshu.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/elfload.c | 1 |
1 files changed, 1 insertions, 0 deletions
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. */ |