From nobody Tue Mar 14 15:58:16 2023 X-Original-To: dev-commits-src-main@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 4PbdV10FGZz3yQY0; Tue, 14 Mar 2023 15:58:17 +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 4PbdV06bBJz4FMZ; Tue, 14 Mar 2023 15:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678809496; 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=Adrhyei+W7KSXZ0BuXqjtFLunA23DiOO8c3VGYjZhSM=; b=hwHd6b/2MgFzxHhCVUmcSE84SeORHyh9H/h3te53Q3SBTTxowa3OibSzkUMpK5B2q9q7os HMKnGLVsp+rJ6B0PseiSuFSWjlewIC27xO5Tu0+rHzcy70XL15th5AVrqlErcI6HYevA1V SXM9kjU0EALpiuzdSM/3faj6AdrKTR14PLbptedWBTQ91CNQHwrxVBOta1+BBOE7JeFd20 jrVB197mYBet+jiO4WBwo+AzojlZq8+/Dmo5Ql8AeOrdFo41b1PdJuP5oX2AQtB87atLnb c9kAHzdJQUoKNBsw/X4vNLGProT55uRSvM9Trwg6+GIVktqIJ7zDJKdu9KC1Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678809496; 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=Adrhyei+W7KSXZ0BuXqjtFLunA23DiOO8c3VGYjZhSM=; b=M2ptYvrUjg0U9LreyHMevZ8WOhy8EfxUvzx9F/ttsUm4XgPsKpR2rV+B0QivvW1ZEpZSRR mvFNgDztNzKQPn/L2WrBDlBGjgZ5iBr/6uaZ+EWOVkPqkd9yklwG8pwHdk4S2+4CQ9TKwN afxfTiWHE9/eqJtmtU3wratibPx71PUVPyNeM/3AUq03tNddxJh90/YQQ2Eto27JXJ7c+M XN51kOKjyB29P4AjB9yq87mnUbRmb/E87IYzt7lFEnSTgudpQc5Xm2TqZXb7wTgQJKGJIN En/Sz8tbl6NR3RQFzlMhSLgXpoGHVG8eUfg4aEIVcU9rqbb4MBACfZtcB09S1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678809496; a=rsa-sha256; cv=none; b=jCXkJ6tSv6dMWxyCuuXkYiTefWS6QtZJq/98Ur3LhKbrG9e3DIywmWERsqaj+D8C5HdpNH JPi9LxsveNvakddL6CQCrbCRe4LoVD3Fr9GXAwg7wAf3WcFAkCvyJ4bEXiv8KZ2AT2ArCX LKNoN+YjmMPZToN3+qyhSCTJUZGm/yLfJvaicbVVQyBelhB8I7WKf/AHBRUWEqJrfsJ04c /txolv8heNzbBt+FNN5y7k1lJs1xcbMKRpVCNNF0nbtQ/b1ysG6WKvrgCZ6WeFlm9hT5CZ bnk/kfDV8szae8qxtaJ6lJFq1WV+ERFl4bUTiI+TiLAUEAChCKmnUED9g0ZA6w== 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 4PbdV05SlJzhT6; Tue, 14 Mar 2023 15:58:16 +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 32EFwGNv007878; Tue, 14 Mar 2023 15:58:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32EFwG7h007877; Tue, 14 Mar 2023 15:58:16 GMT (envelope-from git) Date: Tue, 14 Mar 2023 15:58:16 GMT Message-Id: <202303141558.32EFwG7h007877@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e9ea690ae848 - main - udp: Fix a memory leak in udp6_send() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: e9ea690ae8486b74d6eeca62e316bf591d8aea4e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e9ea690ae8486b74d6eeca62e316bf591d8aea4e commit e9ea690ae8486b74d6eeca62e316bf591d8aea4e Author: Mark Johnston AuthorDate: 2023-03-14 14:26:29 +0000 Commit: Mark Johnston CommitDate: 2023-03-14 15:58:02 +0000 udp: Fix a memory leak in udp6_send() Reviewed by: glebius MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D38993 --- 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 8a95e1623f9c..c5f2cc452dfb 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -766,10 +766,10 @@ udp6_send(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); }