util/oslib-win32: Fix fatal assertion in qemu_try_memalign
commit1c9638667b7068539dc5783c9428d588b14162ea
authorStefan Weil <sw@weilnetz.de>
Fri, 11 Jun 2021 10:58:46 +0000 (11 12:58 +0200)
committerRichard Henderson <richard.henderson@linaro.org>
Sat, 19 Jun 2021 21:51:51 +0000 (19 14:51 -0700)
tree26b345d3596390b66adafbe4999451f5ab7eb3fe
parent9ca0362298d5093352095838fee8ddee83c90bd5
util/oslib-win32: Fix fatal assertion in qemu_try_memalign

The function is called with alignment == 0 which caused an assertion.
Use the code from oslib-posix.c to fix that regression.

Fixes: ed6f53f9ca9
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20210611105846.347954-1-sw@weilnetz.de>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
util/oslib-win32.c