From owner-svn-src-head@freebsd.org Wed Nov 8 23:20:06 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF9EFE5E304; Wed, 8 Nov 2017 23:20:06 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7C7C76B69B; Wed, 8 Nov 2017 23:20:06 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vA8NK5Wf028383; Wed, 8 Nov 2017 23:20:05 GMT (envelope-from antoine@FreeBSD.org) Received: (from antoine@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vA8NK5g7028382; Wed, 8 Nov 2017 23:20:05 GMT (envelope-from antoine@FreeBSD.org) Message-Id: <201711082320.vA8NK5g7028382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: antoine set sender to antoine@FreeBSD.org using -f From: Antoine Brodin Date: Wed, 8 Nov 2017 23:20:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r325565 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: antoine X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 325565 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Nov 2017 23:20:06 -0000 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); }