From 71dac45765e9bbb9a2851ee3b1eaecfac6e7a8fd Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Mon, 21 Sep 2009 10:45:09 -0700 Subject: If an activate routine fails, it needs to clean up the pcap_t, close anything it's opened, etc.. In addition, the op pointers need to be restored to the un-activated state; do that in pcap_activate() if the call to the activate op fails. Also, in the common cleanup code, set the fd's to -1. --- pcap-pf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'pcap-pf.c') diff --git a/pcap-pf.c b/pcap-pf.c index c258e1a..d8326df 100644 --- a/pcap-pf.c +++ b/pcap-pf.c @@ -494,6 +494,7 @@ your system may not be properly configured; see the packetfilter(4) man page\n", return (0); bad: + pcap_cleanup_live_common(p); return (PCAP_ERROR); } -- cgit v1.2.3