mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 14:49:29 +00:00
Don't call WSACleanup if WSAStartup wasn't called
This commit is contained in:
parent
fbadb5256b
commit
75f6b387fe
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue