translate-all: add missing munmap of the code_gen guard page for MIPS

Backports commit 8bdf4997823126a39bd4c99e4b2283b02cc7865f from qemu
This commit is contained in:
Emilio G. Cota 2018-02-23 20:45:27 -05:00 committed by Lioncash
parent 9a2b02b241
commit de17843702
No known key found for this signature in database
GPG Key ID: 4E3C3CC1031BA9C7

View File

@ -722,11 +722,11 @@ static inline void *alloc_code_gen_buffer(struct uc_struct *uc)
case 1:
if (!cross_256mb(buf2, size)) {
/* Success! Use the new buffer. */
munmap(buf, size);
munmap(buf, size + qemu_real_host_page_size);
break;
}
/* Failure. Work with what we had. */
munmap(buf2, size);
munmap(buf2, size + qemu_real_host_page_size);
/* fallthru */
default:
/* Split the original buffer. Free the smaller half. */