diff mbox series

util/oslib-win32: Fixes Use _aligned_malloc for qemu_try_memalign

Message ID 20210111033716.1319-1-luoyonggang@gmail.com
State New
Headers show
Series util/oslib-win32: Fixes Use _aligned_malloc for qemu_try_memalign | expand

Commit Message

Yonggang Luo Jan. 11, 2021, 3:37 a.m. UTC
In commit dfbd0b873a85021c083d9b4b84630c3732645963, the use of
_aligned_malloc are called with wrong parameter order, fixed it.

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 util/oslib-win32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/util/oslib-win32.c b/util/oslib-win32.c
index 83b8e89330..33af8e2506 100644
--- a/util/oslib-win32.c
+++ b/util/oslib-win32.c
@@ -59,7 +59,7 @@  void *qemu_try_memalign(size_t alignment, size_t size)
 
     g_assert(size != 0);
     g_assert(is_power_of_2(alignment));
-    ptr = _aligned_malloc(alignment, size);
+    ptr = _aligned_malloc(size, alignment);
     trace_qemu_memalign(alignment, size, ptr);
     return ptr;
 }