aboutsummaryrefslogtreecommitdiffstats
path: root/pcap-nit.c
diff options
context:
space:
mode:
authorguy <guy>2004-10-19 07:06:11 +0000
committerguy <guy>2004-10-19 07:06:11 +0000
commite5aebee6d80c8909048dc1ce865e9adb97d94fd7 (patch)
tree77b64a0b8528dc128ac9f7c319e58a2b3ca8b565 /pcap-nit.c
parent4b1ac36c836ee326f778742bc28dd3b374702281 (diff)
Add a "pcap_close_common()" routine which can be used as the close
routine for some pcap-XXX.c files and can be called by the close routine in other pcap-XXX.c files.
Diffstat (limited to 'pcap-nit.c')
-rw-r--r--pcap-nit.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/pcap-nit.c b/pcap-nit.c
index 7517f9e..6a8d318 100644
--- a/pcap-nit.c
+++ b/pcap-nit.c
@@ -20,7 +20,7 @@
*/
#ifndef lint
static const char rcsid[] _U_ =
- "@(#) $Header: /tcpdump/master/libpcap/pcap-nit.c,v 1.56 2004-03-23 19:18:06 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/pcap-nit.c,v 1.57 2004-10-19 07:06:13 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -241,12 +241,9 @@ nit_setflags(int fd, int promisc, int to_ms, char *ebuf)
static void
pcap_close_nit(pcap_t *p)
{
- if (p->buffer != NULL)
- free(p->buffer);
+ pcap_close_common(p);
if (p->device != NULL)
free(p->device);
- if (p->fd >= 0)
- close(p->fd);
}
pcap_t *