mirror of
https://github.com/nmap/nmap.git
synced 2026-01-05 14:09:02 +00:00
Don't call WSACleanup if WSAStartup wasn't called
This commit is contained in:
@@ -93,6 +93,7 @@ void win_pre_init() {
|
||||
werd = MAKEWORD( 2, 2 );
|
||||
if( (WSAStartup(werd, &data)) !=0 )
|
||||
fatal("failed to start winsock.\n");
|
||||
atexit(win_cleanup);
|
||||
}
|
||||
|
||||
/* Check if the NPCAP service is running on Windows, and try to start it if it's
|
||||
@@ -258,7 +259,6 @@ void win_init()
|
||||
|
||||
if (!o.have_pcap)
|
||||
o.isr00t = 0;
|
||||
atexit(win_cleanup);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ void win_pre_init() {
|
||||
werd = MAKEWORD( 2, 2 );
|
||||
if( (WSAStartup(werd, &data)) !=0 )
|
||||
fatal("failed to start winsock.\n");
|
||||
atexit(win_cleanup);
|
||||
}
|
||||
|
||||
/* Check if the NPCAP service is running on Windows, and try to start it if it's
|
||||
@@ -255,7 +256,6 @@ void win_init()
|
||||
|
||||
if (!o.havePcap())
|
||||
o.setIsRoot(0);
|
||||
atexit(win_cleanup);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user