svn commit: r297983 - head/contrib/libpcap

Pedro F. Giffuni pfg at FreeBSD.org
Thu Apr 14 18:31:46 UTC 2016


Author: pfg
Date: Thu Apr 14 18:31:45 2016
New Revision: 297983
URL: https://svnweb.freebsd.org/changeset/base/297983

Log:
  libpcap: fix for simple NULL pointer dereference.
  
  Found with devel/coccinelle.

Modified:
  head/contrib/libpcap/pcap-snf.c

Modified: head/contrib/libpcap/pcap-snf.c
==============================================================================
--- head/contrib/libpcap/pcap-snf.c	Thu Apr 14 18:27:10 2016	(r297982)
+++ head/contrib/libpcap/pcap-snf.c	Thu Apr 14 18:31:45 2016	(r297983)
@@ -57,10 +57,11 @@ snf_pcap_stats(pcap_t *p, struct pcap_st
 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);


More information about the svn-src-all mailing list