Marcus Meissner : ws2_32/tests: Avoid crashes on flaky/ non-present network.
Module: wine Branch: master Commit: 0e18800f3955718dbf47a162810495e7ad4f477b URL: http://source.winehq.org/git/wine.git/?a=commit;h=0e18800f3955718dbf47a16281... Author: Marcus Meissner <meissner(a)suse.de> Date: Sun Nov 12 20:50:45 2017 +0100 ws2_32/tests: Avoid crashes on flaky/non-present network. Signed-off-by: Marcus Meissner <meissner(a)suse.de> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/ws2_32/tests/sock.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index 179ace4..4cbc1e9 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -7657,10 +7657,13 @@ static void test_GetAddrInfoExW(void) ok(overlapped.Internal == ERROR_SUCCESS, "overlapped.Internal = %lx\n", overlapped.Internal); ok(overlapped.Pointer == &result, "overlapped.Pointer != &result\n"); ok(result != NULL, "result == NULL\n"); - ok(!result->ai_blob, "ai_blob != NULL\n"); - ok(!result->ai_bloblen, "ai_bloblen != 0\n"); - ok(!result->ai_provider, "ai_provider = %s\n", wine_dbgstr_guid(result->ai_provider)); - pFreeAddrInfoExW(result); + if (result != NULL) + { + ok(!result->ai_blob, "ai_blob != NULL\n"); + ok(!result->ai_bloblen, "ai_bloblen != 0\n"); + ok(!result->ai_provider, "ai_provider = %s\n", wine_dbgstr_guid(result->ai_provider)); + pFreeAddrInfoExW(result); + } result = (void*)0xdeadbeef; memset(&overlapped, 0xcc, sizeof(overlapped));
participants (1)
-
Alexandre Julliard