From nobody Wed Nov 11 16:49:58 2026 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 4jPqJ65cKKz70SlQ for ; Wed, 11 Nov 2026 16:49:58 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jPqJ62764z4n0P for ; Wed, 11 Nov 2026 16:49:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794415798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bax8uUXg+qf8K6jxp8ezIQyRC6/dx/l9UWzC+LCDH2c=; b=R/moB/iqvOpvHjoIwm0Sn/OZN7ubT/xZs0gb/Cv79xsALMS8NlHp2X9TTZ25tNK/3gmyZK KZxHKMIcIepcCV13Oeej32CvWNZUrtpl7wLDTMDDlRPCzG5P8W8Yfw9RR+iYf8h4yEoeil oPJ50VZBtcfY4Dz1ZEK3B0T09Bo97E4jcdq11JcJ8U6M9ETomFTq1sCH6/iWuvHV9Hub6d Fz/1Ui9VPswjUTMbvGujZy8fnBkzwPl8hIv9ShICEXrZm/Zjb8tPyqSZ/gAt8VcLAvToen DY3a8MTVnutRkgduXLxYa2HSulcxIJkrePpHJMbe6SFExWb2yEaUIJg+lQSq0A== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794415798; b=C3qffufmDMLs2cyXFxlD21bG66tC2F+ErSVqELYzrsg7aOy/4qjs6kf+OAXFVDBC9sUbHx BzV6ac2p2Rjf8DJTxRVPtrIJvnfh7ARygjldzNI0gnfKReRS+skuv+IYDRBz2Rm1pW0Y4O wUKu49Pyn1sl1s9bzm9hrl1JmTAOcI57h3t84pMxGmVXwVvurGidmYGU769eUaF+rWxyC1 ZrEQVfZwcYLYFVAN3BwzOwwIgQ3deiuUcfq/HhaEIJwiNbppTEbLBozFERhhE8Am6aQT5P flhDJvGWuBj+2FkSioqHw82HKaiUdf5uN7Jz5L/O5MerAHtXsevEruJAg+itmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794415798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bax8uUXg+qf8K6jxp8ezIQyRC6/dx/l9UWzC+LCDH2c=; b=YglGqys2kCqP0zFMKMbeu9PuCmmJTf7iJ+NfLnhT5+UPr5LvO+sbPsK14d9FbvY6KpftOd oOj65cn2BLFuyygYEppadkyhNFAuHjAHp2LIRWQOs3vPYQ1zap/KTpBiICSqUipwtA99X1 jiNdxStzbXDzNYGg7h8J9HBjLNB39/YUSwxfc8Nxt2s5pG/GFsszGA7ahfo1uoT1o3UO9n 4Flng0KAvim5FZa6owoy1cLfHrFs41QAkMrRxkSF8F8JgIfSwQ/A2x5TE/HFvxlOwDfdTb ds4m/PXhiqLZxSaw8l0zfqKKwBPK44TrFqrZ1fk/Qa3DYKWafF5VIsiq3m8c2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jPqJ60sFSzN78 for ; Wed, 11 Nov 2026 16:49:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1b3c6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 11 Nov 2026 16:49:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Wanpeng Qian From: Mark Johnston Subject: git: e1e4790d7de2 - main - bhyve: rfb: do not destroy a mutex that was never initialized List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: e1e4790d7de20f28683031ac806adb6abbafe867 Auto-Submitted: auto-generated Date: Wed, 11 Nov 2026 16:49:58 +0000 Message-Id: <6af49cb6.1b3c6.344b4e29@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e1e4790d7de20f28683031ac806adb6abbafe867 commit e1e4790d7de20f28683031ac806adb6abbafe867 Author: Wanpeng Qian AuthorDate: 2026-11-11 15:05:50 +0000 Commit: Mark Johnston CommitDate: 2026-11-11 16:49:43 +0000 bhyve: rfb: do not destroy a mutex that was never initialized rfb_init()'s error path tests pixfmt_mtx against NULL, which only compiles where pthread_mutex_t is a pointer, and destroys it. Every jump to that label is before the mutex is initialized, so there is nothing to destroy. The test and the destroy came in with the SetPixelFormat support (D46402). Signed-off-by: Wanpeng Qian Fixes: dda0f9837b1c ("bhyve: support noVNC SetPixelFormat request") Reviewed by: markj MFC after: 1 week Sponsored by: keelos.dev Differential Revision: https://reviews.freebsd.org/D61425 --- usr.sbin/bhyve/rfb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.sbin/bhyve/rfb.c b/usr.sbin/bhyve/rfb.c index 265c95ace0a9..5c6d437e6a8d 100644 --- a/usr.sbin/bhyve/rfb.c +++ b/usr.sbin/bhyve/rfb.c @@ -1463,8 +1463,6 @@ rfb_init(sa_family_t family, const char *hostname, int port, int wait, return (0); error: - if (rc->pixfmt_mtx) - pthread_mutex_destroy(&rc->pixfmt_mtx); if (ai != NULL) { assert(family != AF_UNIX); freeaddrinfo(ai);