From nobody Fri May 10 16:41:42 2024 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 4VbZQv3T9dz5K2KN; Fri, 10 May 2024 16:41: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 4VbZQt6rb5z44jb; Fri, 10 May 2024 16:41:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715359303; 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=3XJxGi04/ObJ9WX80mVxGQTfquVX3X5iaunoy9YbxJ0=; b=NGkVFRLGE1w9+mX3DowLzQxmus5LMVNugHMbsZTIFP4XEAZLrsUwWou/gw0xV3g6cIimQH g88jq/9OnTWBBAzaBZ0SHAg6uca6lm92hm7YFBz+/wcHNS7TSsmml1G+N+TvpHruHdGV9T l41mlYMTiMEYSoX3H0JFeIobDrWB6qX5XgrXG1LlcOejRMnOHKE1e95w6kK80qdGbZHyC0 qGgYGyTBGfdGR+YbNDKcAd1cmatGgtz7YfjOd4f+p992gxZDA8cSDdQrsTqVC+wHicgm1C /V68dcUWoB19195B+2WMElzZukGiidaNv5wEgeTSxNf15IKRyuAc5maDsBrjfg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715359303; a=rsa-sha256; cv=none; b=aLz02iKqbz1yCva8ktpRd1q5i+7np9jY7amva59ia4ksiO2n9jm6nSVCqyCqQ36Ps1sjFY +i9TzPIEBovnpUzw1oiC+0fFKWcIX8Py47WA191EHIlrenHyWb5dn/GJVixz3k7TqjK80Y s31JGXZCeY+xUXTwnYqKnkF1KQlGAwf3TivszfnOKn889A6AQzukU7f77CRLU+tDRRdSZT V6VPRnCd3g5qDwQzH5MzxewHpuhK9WigK22+gPDqVZAInFgsPfVwlen9LCc6PrCgPBc9uy xbksMyCXwDCltHACZ+zJ4t2iQrDdWvMm3S5umoP3qbX6vkVrj2ONhMwseRIgwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715359303; 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=3XJxGi04/ObJ9WX80mVxGQTfquVX3X5iaunoy9YbxJ0=; b=Uj/h+T132Ay0eL/5WXOY0XLdAAJgoaJ49R6xPzl6JJ18ysQnt+Wzoy1Hx9YqFuh8PQ/nhX Vc6/FcRy0CaEuLyXhXS1HYhSF+NiehdaD0c3fcuc3PD7QMhS1PyqYFFhOpMtOy5gocd1A5 WgJ/tGNn4j6h4SWqmtKlDgK9SVgTyNN0XLXYEGs6/WB9xWzVzbIU30lutfniqxuoocbirc KQETDs7Ha8GTCnPyryWPyWaqThZNKYePflBnXvuKcfM7wun6L929MaKirUG6BUjUbiCXMk mpeJTLycIC8ERrBJvYaDbEdf9XPRLtRu2gXLDwLhalDfdNeZPr6vdWpGh20TRw== 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 4VbZQt5rCWzl0n; Fri, 10 May 2024 16:41:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44AGfgUb018070; Fri, 10 May 2024 16:41:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44AGfgkf018067; Fri, 10 May 2024 16:41:42 GMT (envelope-from git) Date: Fri, 10 May 2024 16:41:42 GMT Message-Id: <202405101641.44AGfgkf018067@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 1662e47d91d1 - main - nvmecontrol: Free the addrinfo list when failing to open a TCP socket 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1662e47d91d137891b62fe64ba1370047e7b506f Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1662e47d91d137891b62fe64ba1370047e7b506f commit 1662e47d91d137891b62fe64ba1370047e7b506f Author: John Baldwin AuthorDate: 2024-05-10 16:06:54 +0000 Commit: John Baldwin CommitDate: 2024-05-10 16:13:40 +0000 nvmecontrol: Free the addrinfo list when failing to open a TCP socket Reported by: Coverity Scan CID: 1545048 Sponsored by: Chelsio Communications --- sbin/nvmecontrol/fabrics.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/nvmecontrol/fabrics.c b/sbin/nvmecontrol/fabrics.c index d93e984ee7a3..de069e3df62a 100644 --- a/sbin/nvmecontrol/fabrics.c +++ b/sbin/nvmecontrol/fabrics.c @@ -168,6 +168,7 @@ tcp_qpair_params(struct nvmf_qpair_params *params, int adrfam, return (true); } warn("Failed to connect to controller at %s:%s", address, port); + freeaddrinfo(list); return (false); }