[Midnightbsd-cvs] src [8463] trunk/sys/dev/cxgbe/tom/t4_listen.c: fix leak

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Sep 18 18:02:06 EDT 2016


Revision: 8463
          http://svnweb.midnightbsd.org/src/?rev=8463
Author:   laffer1
Date:     2016-09-18 18:02:06 -0400 (Sun, 18 Sep 2016)
Log Message:
-----------
fix leak

Modified Paths:
--------------
    trunk/sys/dev/cxgbe/tom/t4_listen.c

Modified: trunk/sys/dev/cxgbe/tom/t4_listen.c
===================================================================
--- trunk/sys/dev/cxgbe/tom/t4_listen.c	2016-09-18 22:01:30 UTC (rev 8462)
+++ trunk/sys/dev/cxgbe/tom/t4_listen.c	2016-09-18 22:02:06 UTC (rev 8463)
@@ -559,8 +559,10 @@
 	struct tcphdr *th = (void *)(ip + 1);
 
 	wr = (struct wrqe *)atomic_readandclear_ptr(&synqe->wr);
-	if (wr == NULL)
+	if (wr == NULL) {
+		m_freem(m);
 		return (EALREADY);
+	}
 
 	bzero(&to, sizeof(to));
 	tcp_dooptions(&to, (void *)(th + 1), (th->th_off << 2) - sizeof(*th),



More information about the Midnightbsd-cvs mailing list