Module: wine Branch: master Commit: 88e66d0785dbc80bb49834676ef00a71963d0e4f URL: https://gitlab.winehq.org/wine/wine/-/commit/88e66d0785dbc80bb49834676ef00a7...
Author: Alex Henrie alexhenrie24@gmail.com Date: Sat Nov 11 14:40:00 2023 -0700
user32/tests: Allocate clipboard data with HeapAlloc.
This partially reverts commit faae2162b89e951a94f74f65986f6a1015366cf3.
---
dlls/user32/tests/clipboard.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/tests/clipboard.c b/dlls/user32/tests/clipboard.c index 819188fa8e3..87df06b6621 100644 --- a/dlls/user32/tests/clipboard.c +++ b/dlls/user32/tests/clipboard.c @@ -1531,10 +1531,10 @@ static void test_handles( HWND hwnd )
if (0) /* crashes on vista64 */ { - ptr = malloc( sizeof(void *) ); + ptr = HeapAlloc( GetProcessHeap(), 0, 0 ); h = SetClipboardData( format_id2, ptr ); ok( !h, "got %p\n", h ); - free( ptr ); + HeapFree( GetProcessHeap(), 0, ptr ); }
h = SetClipboardData( format_id2, empty_fixed ); @@ -1547,12 +1547,12 @@ static void test_handles( HWND hwnd ) ok( h == hmoveable, "got %p\n", h ); ok( is_moveable( h ), "expected moveable mem %p\n", h );
- ptr = malloc( 37 ); + ptr = HeapAlloc( GetProcessHeap(), 0, 37 ); h = SetClipboardData( 0xdeadfade, ptr ); ok( h == ptr || !h, "got %p\n", h ); if (!h) /* heap blocks are rejected on >= win8 */ { - free( ptr ); + HeapFree( GetProcessHeap(), 0, ptr ); ptr = NULL; }