diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-14 18:31:45 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-14 18:31:45 +0000 |
commit | f782132f224104b62501fd7f47c7d65d1bd0da8c (patch) | |
tree | f55bbf52cb4c14eebc6310ad52f52832975ced76 /contrib/libpcap | |
parent | b39957c360ee5bb0d9e656e636e36d475713f6cc (diff) | |
download | FreeBSD-src-f782132f224104b62501fd7f47c7d65d1bd0da8c.zip FreeBSD-src-f782132f224104b62501fd7f47c7d65d1bd0da8c.tar.gz |
libpcap: fix for simple NULL pointer dereference.
Found with devel/coccinelle.
Diffstat (limited to 'contrib/libpcap')
-rw-r--r-- | contrib/libpcap/pcap-snf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/libpcap/pcap-snf.c b/contrib/libpcap/pcap-snf.c index ee6ffa4..b8025ba 100644 --- a/contrib/libpcap/pcap-snf.c +++ b/contrib/libpcap/pcap-snf.c @@ -57,10 +57,11 @@ snf_pcap_stats(pcap_t *p, struct pcap_stat *ps) static void snf_platform_cleanup(pcap_t *p) { - struct pcap_snf *ps = p->priv; + struct pcap_snf *ps; if (p == NULL) return; + ps = p->priv; snf_ring_close(ps->snf_ring); snf_close(ps->snf_handle); |