winhttp/tests: Avoid an invalid write in asynchronous mode (Valgrind).

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hans Leidekker 2018-11-09 14:55:00 +01:00 committed by Alexandre Julliard
parent 633779b472
commit 165000d457
1 changed files with 2 additions and 3 deletions

View File

@ -920,7 +920,7 @@ static const struct notification read_allow_close_test[] =
static void _read_request_data(struct test_request *req, struct info *info, const char *expected_data, BOOL closing_connection, unsigned line)
{
char buffer[1024];
DWORD read, len;
DWORD len;
BOOL ret;
if (closing_connection)
@ -937,8 +937,7 @@ static void _read_request_data(struct test_request *req, struct info *info, cons
setup_test( info, winhttp_read_data, line );
memset(buffer, '?', sizeof(buffer));
read = 0xdeadbeef;
ret = WinHttpReadData( req->request, buffer, sizeof(buffer), &read );
ret = WinHttpReadData( req->request, buffer, sizeof(buffer), NULL );
ok(ret, "failed to read data %u\n", GetLastError());
WaitForSingleObject( info->wait, INFINITE );