From nobody Sun Feb 8 12:20:34 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1655876224; cv=none; d=zohomail.com; s=zohoarc; b=CqelKiLKIJ2+YJ60HnEGvwTXdBONV/t0AC3DZP1e67EqspRpKRG8oyIEt3w4j0td7VOzpbrG62Kkfd1i2GzMqIWKKTECXlPztvr6NmNyZyLdAn0HpNaTl0fUh4OKlifxhtNb9QPgjYEo9AxQTPOxT4K8psR/NM1cu7SdTGqgAXE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1655876224; 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=Rb6IBKoxMwdIzibXWBd79nTb2l6exWWMuQB2hiDBnpo=; b=ZpTpY7j/l51E6Ny1MOvTJR2BiVbuaPKGFoUfylV/lpPqinEF0sDGeFo9tC/oorCDfLJJ/+DvmE+Up0r5a3atZ020h86DvltTc/yjwuQK12O+DTBNJUli6zHi8bDsWCMXKk8xlgJp1nbKD6+GD7pe7zC/Zm9/KWkm209tpt5VMfc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1655876224883866.7514649524365; Tue, 21 Jun 2022 22:37:04 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-49-Evq5N6pjNEyOOt5uA5ItcQ-1; Wed, 22 Jun 2022 01:35:46 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1FFFA85A58A; Wed, 22 Jun 2022 05:35:43 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0A69E1121315; Wed, 22 Jun 2022 05:35:43 +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 E3690194704A; Wed, 22 Jun 2022 05:35:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id DF1561947055 for ; Wed, 22 Jun 2022 05:35:39 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id D115E1121315; Wed, 22 Jun 2022 05:35:39 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7864E1121314 for ; Wed, 22 Jun 2022 05:35:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655876223; 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=Rb6IBKoxMwdIzibXWBd79nTb2l6exWWMuQB2hiDBnpo=; b=AJTDPMoJ9GvrDw54z5lBH2U8945+Hi+xKb48UTPt33m9cLTfBW/smfn48/8cT2zKLjglqh uu/yOBhK8DBG2qj1oqqHFDsSq4EVpz5OINvopRdbliJpWGknHfKN//bLClD50uEHHJsAfx 9JsiAo7fjX4Vh+oKKT4BZMNaFj0Ycxk= X-MC-Unique: Evq5N6pjNEyOOt5uA5ItcQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 6/6] libxl: remove cleanup label from libxlDomainMigrationSrcPerform Date: Wed, 22 Jun 2022 07:35:34 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 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 2.78 on 10.11.54.3 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1655876226730100001 Use VIR_AUTOCLOSE for the remaining file descriptor that uses manual cleanup and remove the label. Signed-off-by: J=C3=A1n Tomko --- src/libxl/libxl_migration.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c index c5ec80139f..800a6b0365 100644 --- a/src/libxl/libxl_migration.c +++ b/src/libxl/libxl_migration.c @@ -1183,13 +1183,13 @@ libxlDomainMigrationSrcPerform(libxlDriverPrivate *= driver, char portstr[100]; g_autoptr(virURI) uri =3D NULL; virNetSocket *sock; - int sockfd =3D -1; + VIR_AUTOCLOSE sockfd =3D -1; int ret =3D -1; =20 /* parse dst host:port from uri */ uri =3D virURIParse(uri_str); if (uri =3D=3D NULL || uri->server =3D=3D NULL || uri->port =3D=3D 0) - goto cleanup; + return -1; =20 hostname =3D uri->server; port =3D uri->port; @@ -1199,11 +1199,11 @@ libxlDomainMigrationSrcPerform(libxlDriverPrivate *= driver, if (virNetSocketNewConnectTCP(hostname, portstr, AF_UNSPEC, &sock) < 0) - goto cleanup; + return -1; =20 if (virNetSocketSetBlocking(sock, true) < 0) { virObjectUnref(sock); - goto cleanup; + return -1; } =20 sockfd =3D virNetSocketDupFD(sock, true); @@ -1229,8 +1229,6 @@ libxlDomainMigrationSrcPerform(libxlDriverPrivate *dr= iver, libxlDomainObjEndJob(driver, vm); } =20 - cleanup: - VIR_FORCE_CLOSE(sockfd); return ret; } =20 --=20 2.34.1