summaryrefslogtreecommitdiff
path: root/tshark.c
diff options
context:
space:
mode:
Diffstat (limited to 'tshark.c')
-rw-r--r--tshark.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/tshark.c b/tshark.c
index 68964bbd57..3ccb2d8467 100644
--- a/tshark.c
+++ b/tshark.c
@@ -661,6 +661,7 @@ main(int argc, char *argv[])
gboolean arg_error = FALSE;
#ifdef _WIN32
+ int result;
WSADATA wsaData;
#endif /* _WIN32 */
@@ -1769,7 +1770,12 @@ main(int argc, char *argv[])
#ifdef _WIN32
/* Start windows sockets */
- WSAStartup( MAKEWORD( 1, 1 ), &wsaData );
+ result = WSAStartup( MAKEWORD( 1, 1 ), &wsaData );
+ if (result != 0)
+ {
+ exit_status = INIT_FAILED;
+ goto clean_exit;
+ }
#endif /* _WIN32 */
/* Notify all registered modules that have had any of their preferences