Fixed a memory leak in pcap_close_win32: p->Packet was not freed when
the adapter is closed.
This commit is contained in:
parent
4ce3baf349
commit
6ec634f388
|
@ -32,7 +32,7 @@
|
|||
|
||||
#ifndef lint
|
||||
static const char rcsid[] _U_ =
|
||||
"@(#) $Header: /tcpdump/master/libpcap/pcap-win32.c,v 1.22 2004-06-07 13:27:46 risso Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/libpcap/pcap-win32.c,v 1.23 2004-06-16 15:51:46 risso Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#include <pcap-int.h>
|
||||
|
@ -383,6 +383,10 @@ pcap_close_win32(pcap_t *p)
|
|||
PacketCloseAdapter(p->adapter);
|
||||
p->adapter = NULL;
|
||||
}
|
||||
if (p->Packet) {
|
||||
PacketFreePacket(p->Packet);
|
||||
p->Packet = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
pcap_t *
|
||||
|
|
Reference in New Issue