diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-04-15 16:36:59 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-04-15 16:36:59 -0700 |
commit | 4418d041840c295df2ad6ac97459a3e460a8f3d4 (patch) | |
tree | 130a802a1e48c007649835162f32bdb121494c1c /pcap-snf.c | |
parent | dca2f470ba8ff755361129c9956899bec46357e2 (diff) | |
download | libpcap-4418d041840c295df2ad6ac97459a3e460a8f3d4.tar.gz |
Don't check for NULL in cleanup routines, and don't pass NULL to them.
pcap_close() won't pass a null pointer - it'll crash long before that
when handed a null pointer, as the platforms on which we run map out
page 0.
Remove the null pointer checks, and, in cases where the cleanup routines
are called internally, make sure we don't pass them a null pointer.
Diffstat (limited to 'pcap-snf.c')
-rw-r--r-- | pcap-snf.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -66,9 +66,6 @@ snf_platform_cleanup(pcap_t *p) { struct pcap_snf *ps = p->priv; - if (p == NULL) - return; - #ifdef SNF_HAVE_INJECT_API if (ps->snf_inj) snf_inject_close(ps->snf_inj); |