From nobody Mon Mar 20 13:33:43 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PgG0R36ftz40k0M; Mon, 20 Mar 2023 13:33:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PgG0R1yFvz3Nbx; Mon, 20 Mar 2023 13:33:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679319223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0KkwYIsElpYSECQHItyaMaCdZR0QZviQww18HYNiJSw=; b=WAXvR7ZgMxY4NqWdAA9BxS6GKip5cdc8E+ggYx7MetU0bDMOybcDq8JQlTypM3BYpmrI+7 HweeDYKnHBiDKbiOOg3gcWi+ZseMRElRRqKsvssySZBrwZHaL98/u2enuewSBd7MGoswaI wZTLJ5Iorpupf+GsMP9Kl66ENkfbRef1sfKhSTyQXCK94zEWPav5jCDyqpJpIjagQYqBHT xnsBl7R5zKZVGsR0oxBi5f9vnxWMB5Wvd8rbgNPKEU3gQzwfH8lH2H3Dq2MUk8YIJcjJYV SHgzUZkaQk0pYyAtZIZawcpvr6TgNUhiGx9egKPjKmVdVBrLvBuFxha1/NOkTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1679319223; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0KkwYIsElpYSECQHItyaMaCdZR0QZviQww18HYNiJSw=; b=gwtgJeTxJCx/Td+oA8xxzxkf6Ut4xhOCe3bOHzCqLaPA4qyaVuJRrsosROga51FuHSVyFq LBxohioHRYrm+9qLAUhDISfiz7lutuV23ctVcAOLFZOkR5UETQW4ufXSq9NQ48KUgIKJtA 604EM3v8OKJzgSsvuBzg4eupaC/WF5hkDkWd1vi9Mw1wbVPVVCRfg6Zm+1/qQErCJGe5fU 0nP9p4GFfLRRLdb/kMN4vwuozIVlWwPWlgLl0agpTfEUWNrIlfGVOz4ZRZKi7cMXnXLF4D VRCtxXlg8ItvHrrn4etNS6r4rZxJbdW6+eL9xyBBYBcd6itdOvrWnvqbL1yU0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1679319223; a=rsa-sha256; cv=none; b=qbUPbh3fQWueYT+HYW5O/Qxvbv1is3zlVInx9H+a04gahl0VDOjWld2zfqNZb/KmZr5xUn nc6T7c6BAIRmvkCcZ5ux11tHicrH1UnR1fOD7mVO5v3As+Q0nzJOL83KpI5sUV3El1GgSC ktQycoG9yHW7PusutcxboLMH1jY+BRnq1/Ui09Ko0nSljfGs4+4PrEq7+veXCxOxUYRQgF HDwn8tbv2wDyc++hfwevdTlh+BrlRnvilEVGccSkGiATCIr7jtFSvcNBBaGmVn+Dx0bbc8 7gHYi0y2W1JPEHEGYDuNmx3W4b0l4axDDd7jrHWH4uW9/xdSzEsopnXiz59Ngw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PgG0R149qzX4R; Mon, 20 Mar 2023 13:33:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32KDXhqH073596; Mon, 20 Mar 2023 13:33:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32KDXh1g073595; Mon, 20 Mar 2023 13:33:43 GMT (envelope-from git) Date: Mon, 20 Mar 2023 13:33:43 GMT Message-Id: <202303201333.32KDXh1g073595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mark Johnston Subject: git: a16d3089b295 - stable/13 - udp: Fix a memory leak in udp6_send() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a16d3089b2951c3c13979fd79313bb6c7b652445 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a16d3089b2951c3c13979fd79313bb6c7b652445 commit a16d3089b2951c3c13979fd79313bb6c7b652445 Author: Mark Johnston AuthorDate: 2023-03-14 14:26:29 +0000 Commit: Mark Johnston CommitDate: 2023-03-20 12:52:07 +0000 udp: Fix a memory leak in udp6_send() Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38993 (cherry picked from commit e9ea690ae8486b74d6eeca62e316bf591d8aea4e) --- sys/netinet6/udp6_usrreq.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index ff7227cb99f3..6c40a8cae2d5 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -803,10 +803,10 @@ udp6_output(struct socket *so, int flags_arg, struct mbuf *m, * Given this is either an IPv6-only socket or no INET is * supported we will fail the send if the given destination * address is a v4mapped address. - * - * XXXGL: do we leak m and control? */ INP_UNLOCK(inp); + m_freem(m); + m_freem(control); return (EINVAL); }