From nobody Sun Feb 8 16:06:24 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1673430369; cv=none; d=zohomail.com; s=zohoarc; b=I60P2MnxCP0IwQX2uTRzYIZikf9xs+V9/ncWDWftovh+mq0bp5tmWymSl7gU+ALvVtQIW/lkQsmfrojZoR5rOGY7GsA3wnVZyCBzjbaOJxGtdAx5rT66KHkDIU1lKZuWf0gkQb2bzW9iBbuM7kYwa8eE/8/xR/vab47zJDmL8BI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1673430369; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=BrFLiyddrvRkUFFwtT/zTp8pnG4dSVvQD3fTgvRtjbM=; b=kw8VHtWGpAA6ouIe2jJZgPB/l27PJrL4qf61TA2l1IOtc/z5/7Ex2U8vHHrUZ4D8jUQmDNv8jY3y8M2A2SirL3MqP68py5vIL2DErMJN30+GtKgC75CV4iRKNzF1NugOqSeshRus9ZwRwkarXuVhb8EOnkKKvNTWiNlp9kHa4+U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1673430369201951.4095448498089; Wed, 11 Jan 2023 01:46:09 -0800 (PST) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-650-A0zC4IKqMjyLJMrHss7AeA-1; Wed, 11 Jan 2023 04:45:27 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 515543C10EE4; Wed, 11 Jan 2023 09:45:25 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38883140EBF4; Wed, 11 Jan 2023 09:45:25 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 1FD891946A75; Wed, 11 Jan 2023 09:45:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B38431946A71 for ; Wed, 11 Jan 2023 09:45:04 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A92142026D2A; Wed, 11 Jan 2023 09:45:04 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.227]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6C03C2026D76 for ; Wed, 11 Jan 2023 09:45:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673430368; h=from:from:sender:sender: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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=BrFLiyddrvRkUFFwtT/zTp8pnG4dSVvQD3fTgvRtjbM=; b=PXBWVd4XWRsOz0vpChwL02x3a+t554HjP89FkMDH2GEolLbBQIbQ3AIFoFQmrqidoqDq/C A1vCCXLptQNFNKPc+3rvq4a0qlD2GGZgkUFanlQxBu/W5BK1ZalNQRZFyBbHFyTB7i/cYl H/lIUhSFnvGpTbi7iZUjlCUBOShB1HY= X-MC-Unique: A0zC4IKqMjyLJMrHss7AeA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] qemu: Change some gotos in qemuPasstStart to direct return Date: Wed, 11 Jan 2023 10:44:59 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1673430370839100001 Content-Type: text/plain; charset="utf-8" Jumping to the error label and reading the pidfile does not make sense until we reached qemuSecurityCommandRun which creates the pidfile. Signed-off-by: Jiri Denemark --- src/qemu/qemu_passt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_passt.c b/src/qemu/qemu_passt.c index 5493eee494..a7ee841af7 100644 --- a/src/qemu/qemu_passt.c +++ b/src/qemu/qemu_passt.c @@ -209,14 +209,14 @@ qemuPasstStart(virDomainObj *vm, /* validation guarantees this will never happen */ virReportError(VIR_ERR_INTERNAL_ERROR, _("Invalid portForward proto value %u"), pf->pr= oto); - goto error; + return -1; } =20 if (VIR_SOCKET_ADDR_VALID(&pf->address)) { g_autofree char *addr =3D NULL; =20 if (!(addr =3D virSocketAddrFormat(&pf->address))) - goto error; + return -1; =20 virBufferAddStr(&buf, addr); =20 @@ -258,7 +258,7 @@ qemuPasstStart(virDomainObj *vm, =20 =20 if (qemuExtDeviceLogCommand(driver, vm, cmd, "passt") < 0) - goto error; + return -1; =20 if (qemuSecurityCommandRun(driver, vm, cmd, -1, -1, &exitstatus, &cmdr= et) < 0) goto error; --=20 2.39.0