From nobody Sat Nov 20 18:33:51 2021 X-Original-To: dev-commits-src-all@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 D7D3918A253F; Sat, 20 Nov 2021 18:33:51 +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 4HxMcb5jjdz4hTn; Sat, 20 Nov 2021 18:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 A440A20BC0; Sat, 20 Nov 2021 18:33:51 +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 1AKIXpIG076209; Sat, 20 Nov 2021 18:33:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKIXpDv076208; Sat, 20 Nov 2021 18:33:51 GMT (envelope-from git) Date: Sat, 20 Nov 2021 18:33:51 GMT Message-Id: <202111201833.1AKIXpDv076208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Robert Wing Subject: git: f8145bd4bcc0 - stable/12 - fsck_ufs: fix segfault with gjournal List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: f8145bd4bcc025fbb1750d9daf75e92916db4192 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=f8145bd4bcc025fbb1750d9daf75e92916db4192 commit f8145bd4bcc025fbb1750d9daf75e92916db4192 Author: Robert Wing AuthorDate: 2021-06-03 01:41:31 +0000 Commit: Robert Wing CommitDate: 2021-11-20 18:24:06 +0000 fsck_ufs: fix segfault with gjournal The segfault was being hit in closedisk() while trying to free a non-pointer. The fix for this bug differs between stable/12 and stable/13. PR: 245907 Submitted by: longwitz@incore.de Differential Revision: https://reviews.freebsd.org/D30537 (cherry picked from commit 441e69e419effac0225a45f4cdb948280b8ce5ab) --- sbin/fsck_ffs/gjournal.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sbin/fsck_ffs/gjournal.c b/sbin/fsck_ffs/gjournal.c index b9bfd1bfcced..dca08278569d 100644 --- a/sbin/fsck_ffs/gjournal.c +++ b/sbin/fsck_ffs/gjournal.c @@ -246,7 +246,6 @@ closedisk(void) err(1, "sbwrite(%s)", devnam); if (ufs_disk_close(diskp) == -1) err(1, "ufs_disk_close(%s)", devnam); - free(diskp); diskp = NULL; fs = NULL; }