From nobody Fri Apr 19 00:18:54 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 4VLFcZ3LP2z5HP2l; Fri, 19 Apr 2024 00:18:54 +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 4VLFcZ2P5wz4rJr; Fri, 19 Apr 2024 00:18:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713485934; 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=MeLSs6F1FkYYBlzBLJLGzXjUKVh/WvVXSCczIoxlBBU=; b=PwIUP/d6STR1KJ45//+Do6thbAZatP2W5bA4lhgU/8Ju+WRdFp1pfVgc41O4Knbia/X4yk lMxxFD0BLTPhdI+eajwKyQn7eL+tlucElxI9nUD3LbPfUsw/FeJEQ8g+riNpabAwE3X4/b jCWXi6eM5Qek3bsddmHe2j3Vca7Zu+9CvWqYPmcXxHiCdHkZSX1d20IFCBwTArpmS8ypT6 DjlHDGcuBLUygTIwchba8PegZSeR2hvEfLnituXUP9DmUkoGYH+cGGWR/+XlBcqSRHLgZg dAwAOJ349DTQ11NpTBJFrxpyMZ4OUy9f/OuDSUUtDOwKEQ4yWtP/HwTXBHUOlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713485934; a=rsa-sha256; cv=none; b=D3UykJuOI2c3GQLK2NFOBwObVNJ2U3hzPpcbQKtWuxfYtxemhEJJwb2Qf8H0lIa4+vBnnG ZQwwAwsWEKrjQRPRu4YeHnrpKxQpgA8QwrIj1Z2ECm+zr5S3wihAs3pLBPM3LayHebzquc nSSYg4omKsz9jsrVvvvYM9ULdbrUkkJqYFVu7IYbljJtFLfxTd9tMuaZIqr5Q08zBKg8CM 7xqWeThglddlU5OrlrrDIWCr0UWC77F9w8i0YvfKye7mvhp5RKY/snzbP2Arn84KbjqXvK rq/RTiNY7TzXytNuaWVfuwdYY+lCeS8QsrKsdTnmtONIjJdju9jCtwz6ddTJKw== 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=1713485934; 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=MeLSs6F1FkYYBlzBLJLGzXjUKVh/WvVXSCczIoxlBBU=; b=Sd9tJAkvjdFybnIf3eAl5/DeGlOHokw9mrZlVdM8YTM4BCBj0VzKuDgH2676GU2eYC1ZYd czxyLn1MrX4rdfqyJZQYULPeU2ZXo5TRgnn3ezpD3nCbQ/l9DOcQ58q6R2a03v/6Dj4JuL 9SHEYjc9oNzpdOpHqDBBt2982ljRDMzyBKol/rLOpVFjpcxGshtcxq/n446EZE5XD66Bvj oqMhAbuqjiDhbr8rhGRTjU7qryb7hQbGozhd3WAppsFgxf6UscMkjljQOmh4OC4+1UYRcf FswzUUH+yogacEtbSfvEUCeXHrzLjL87I8OBmBc2klAxEMN+aOqgK+eyrgv33g== 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 4VLFcZ202qzXKd; Fri, 19 Apr 2024 00:18:54 +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 43J0Ish5031400; Fri, 19 Apr 2024 00:18:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43J0IsdK031398; Fri, 19 Apr 2024 00:18:54 GMT (envelope-from git) Date: Fri, 19 Apr 2024 00:18:54 GMT Message-Id: <202404190018.43J0IsdK031398@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: e411b2273603 - main - uipc_shm: Fix a free() of an uninitialized variable 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: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e411b2273603267dbc51c7839879e765b573c1c5 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e411b2273603267dbc51c7839879e765b573c1c5 commit e411b2273603267dbc51c7839879e765b573c1c5 Author: Mark Johnston AuthorDate: 2024-04-19 00:15:51 +0000 Commit: Mark Johnston CommitDate: 2024-04-19 00:18:29 +0000 uipc_shm: Fix a free() of an uninitialized variable Reported by: Coverity CID: 1544043 Fixes: b112232e4fb9 ("uipc_shm: Copyin userpath for ktrace(2)") --- sys/kern/uipc_shm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 14fe43524935..1136f34a6f85 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -1215,6 +1215,8 @@ kern_shm_open2(struct thread *td, const char *userpath, int flags, mode_t mode, #endif AUDIT_ARG_UPATH1_CANON(path); + } else { + path = NULL; } pdp = td->td_proc->p_pd;