File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,10 @@ NTSTATUS TracertHostnameLookupCallback(
59
59
)
60
60
{
61
61
PTRACERT_RESOLVE_WORKITEM resolve = Parameter ;
62
+ WSADATA winsockStartup ;
63
+
64
+ if (WSAStartup (WINSOCK_VERSION , & winsockStartup ) != ERROR_SUCCESS )
65
+ return STATUS_INVALID_PARAMETER ;
62
66
63
67
if (resolve -> Type == PH_IPV4_NETWORK_TYPE )
64
68
{
@@ -131,6 +135,8 @@ NTSTATUS TracertHostnameLookupCallback(
131
135
}
132
136
}
133
137
138
+ WSACleanup ();
139
+
134
140
return STATUS_SUCCESS ;
135
141
}
136
142
@@ -269,11 +275,6 @@ NTSTATUS NetworkTracertThreadStart(
269
275
IP_FLAG_DF ,
270
276
0
271
277
};
272
- WSADATA winsockStartup ;
273
-
274
- // WSAStartup required by GetNameInfo.
275
- if (WSAStartup (WINSOCK_VERSION , & winsockStartup ) != ERROR_SUCCESS )
276
- goto CleanupExit ;
277
278
278
279
if (icmpRandString = PhCreateStringEx (NULL , PhGetIntegerSetting (SETTING_NAME_PING_SIZE ) * 2 + 2 ))
279
280
{
@@ -468,7 +469,6 @@ NTSTATUS NetworkTracertThreadStart(
468
469
if (icmpEchoBuffer )
469
470
PhDereferenceObject (icmpEchoBuffer );
470
471
471
- WSACleanup ();
472
472
return STATUS_SUCCESS ;
473
473
}
474
474
You can’t perform that action at this time.
0 commit comments