Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Nov 2017 23:20:05 +0000 (UTC)
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325565 - head/sys/net
Message-ID:  <201711082320.vA8NK5g7028382@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: antoine
Date: Wed Nov  8 23:20:05 2017
New Revision: 325565
URL: https://svnweb.freebsd.org/changeset/base/325565

Log:
  Do not leak control in raw_usend

Modified:
  head/sys/net/raw_usrreq.c

Modified: head/sys/net/raw_usrreq.c
==============================================================================
--- head/sys/net/raw_usrreq.c	Wed Nov  8 23:11:15 2017	(r325564)
+++ head/sys/net/raw_usrreq.c	Wed Nov  8 23:20:05 2017	(r325565)
@@ -225,9 +225,10 @@ raw_usend(struct socket *so, int flags, struct mbuf *m
 	KASSERT(sotorawcb(so) != NULL, ("raw_usend: rp == NULL"));
 
 	if ((flags & PRUS_OOB) || (control && control->m_len)) {
-		/* XXXRW: Should control also be freed here? */
 		if (m != NULL)
 			m_freem(m);
+		if (control != NULL)
+			m_freem(control);
 		return (EOPNOTSUPP);
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711082320.vA8NK5g7028382>