libpcap: fix for simple NULL pointer dereference.

Found with devel/coccinelle.
This commit is contained in:
pfg 2016-04-14 18:31:45 +00:00
parent b39957c360
commit f782132f22

View File

@ -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);