Made use of exit handler.

This commit is contained in:
oliverschmidt 2007-05-22 22:01:03 +00:00
parent b8b0dfaa5d
commit 0bf8c95b79

View file

@ -30,7 +30,7 @@
*
* Author: Oliver Schmidt <ol.sc@web.de>
*
* $Id: wpcap.c,v 1.7 2007/05/20 21:32:24 oliverschmidt Exp $
* $Id: wpcap.c,v 1.8 2007/05/22 22:01:03 oliverschmidt Exp $
*/
#define WIN32_LEAN_AND_MEAN
@ -77,6 +77,8 @@ struct pcap_pkthdr {
DWORD len;
};
HMODULE wpcap;
static struct pcap *pcap;
static int (* pcap_findalldevs)(struct pcap_if **, char *);
@ -193,7 +195,6 @@ void
wpcap_init(void)
{
struct in_addr addr;
HMODULE wpcap;
#ifdef __CYGWIN__
addr.s_addr = inet_addr((*__argv)[1]);
@ -252,5 +253,6 @@ wpcap_send(void)
void
wpcap_exit(void)
{
FreeLibrary(wpcap);
}
/*---------------------------------------------------------------------------*/