From e1e0aa8d3e332ebe005beedef5b0d52bcead8953 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Fri, 16 Nov 2012 00:21:54 +0000 Subject: [PATCH] cxgbe/tom: Plug mbuf leak. MFC after: 3 days --- sys/dev/cxgbe/tom/t4_listen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/dev/cxgbe/tom/t4_listen.c b/sys/dev/cxgbe/tom/t4_listen.c index 05d11b36b8a..84cd1a27986 100644 --- a/sys/dev/cxgbe/tom/t4_listen.c +++ b/sys/dev/cxgbe/tom/t4_listen.c @@ -559,8 +559,10 @@ t4_syncache_respond(struct toedev *tod, void *arg, struct mbuf *m) 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),