libpcap: fix for simple NULL pointer dereference.
Found with devel/coccinelle.
This commit is contained in:
parent
b39957c360
commit
f782132f22
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user