From nobody Sun Feb 8 11:30:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1594633870; cv=none; d=zohomail.com; s=zohoarc; b=lkLlWSGBML17HwndZ5xL55BN3TAN7lPvVbZiLSE5HM4EOnn3+A+S2xtE6XLnPD8xBNv1/hkN9Fk0Mrl+pI0+qnYwv4EVjhtoxFnuDtwnquONsJby5wQWYCS+lm8rYSnxRP0lda6fxyFPUN+notov9llkQqqdIhYm6nehyLcxbhc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594633870; h=Content-Type:Content-Transfer-Encoding:Cc: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=HCxy+dn3nc4vT1HB1uzeheY9iFR3LsewyS1lOhJ5wJQ=; b=f5v9eUt/eZRkWq6Ylt6sHrQLTeGsrDnRMPfygj5OpJdicaoGO0OPe4hHQ1fGLp9Opk+mLiCQALdLcQEbA8XvvqiArDCSG0pqFlYCoUzFoGlVo3ypFjzN75T6qpgwmrC7dfQhQugEihRYh3KMtsDSLBH0v+4sHR1oboh04PMcIpE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1594633870876296.8427844362635; Mon, 13 Jul 2020 02:51:10 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-363-Z5E74n_ZNuuDcCJZT4O5kw-1; Mon, 13 Jul 2020 05:51:06 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8117E106B25A; Mon, 13 Jul 2020 09:50:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5F8D95FC3B; Mon, 13 Jul 2020 09:50:57 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2E4AF94F15; Mon, 13 Jul 2020 09:50:57 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06D9okXC005998 for ; Mon, 13 Jul 2020 05:50:46 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2A90BE38D3; Mon, 13 Jul 2020 09:50:46 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BAD9CE5B3C for ; Mon, 13 Jul 2020 09:50:36 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B2C4D100E7D3 for ; Mon, 13 Jul 2020 09:50:36 +0000 (UTC) Received: from mail-qv1-f68.google.com (mail-qv1-f68.google.com [209.85.219.68]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-189-TnEDTbTMOzeiuNsPtZR9Jg-1; Mon, 13 Jul 2020 05:50:34 -0400 Received: by mail-qv1-f68.google.com with SMTP id e3so5470844qvo.10 for ; Mon, 13 Jul 2020 02:50:34 -0700 (PDT) Received: from rekt.ibmuc.com ([2804:431:c7c7:530c:1b8b:2d79:f76d:3f06]) by smtp.gmail.com with ESMTPSA id o15sm18335057qko.67.2020.07.13.02.50.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 02:50:33 -0700 (PDT) X-MC-Unique: Z5E74n_ZNuuDcCJZT4O5kw-1 X-MC-Unique: TnEDTbTMOzeiuNsPtZR9Jg-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HCxy+dn3nc4vT1HB1uzeheY9iFR3LsewyS1lOhJ5wJQ=; b=HoHm/sSFDFEGmAKeJIqEO/ADkBP3V3bo3r0uvIQZxtjxd/CclFPTymoJQXHPrk/nFP sAO+ulUWI8eSY0LcG4uEXPWa8YMT4KUohQi7KGbqG2OkiS8UB/EZibBUa5YJwXd99DSQ PBSComxK6Yox0th2miMmIDq2fu2BAE6PnMXasjpYlob1bU6RXxCaLiHmsTE/EXM1ii6n MZV8dyC3uZtIpUZZ83i0wvlRXjwjCx2G4R0/03agWf9wqWwe9Kkyy6E6Wh0O1Lrm/mxX 81CqVbfmBOn8gKEIZXXFMeUrrCmbuGs6NNFrUBH68BcD6mfrziUKXREXjtm6ame1Tczd NUqA== X-Gm-Message-State: AOAM530leyVrlcVkeyoU7mbHROUiJLo7f8hRnnYKw4zJf+3ckD/9np+9 VmsCNkbwvcOIy4au2Zo/zH0tM6RcWgw= X-Google-Smtp-Source: ABdhPJw6DIeI+qjqWVUUbamPIjCN6pCXPrx/k455ECI9KQACAT5G/VjITKes3JBveXbxGhO4YSBpQA== X-Received: by 2002:ad4:452c:: with SMTP id l12mr59655668qvu.198.1594633833780; Mon, 13 Jul 2020 02:50:33 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 18/25] qemu_migration.c: modernize qemuMigrationSrcPerformNative() Date: Mon, 13 Jul 2020 06:49:50 -0300 Message-Id: <20200713094957.1648405-19-danielhb413@gmail.com> In-Reply-To: <20200713094957.1648405-1-danielhb413@gmail.com> References: <20200713094957.1648405-1-danielhb413@gmail.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Use g_autoptr() and remove the unneeded 'cleanup' label. Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 58c80533d8..884f1bc4a0 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3844,7 +3844,7 @@ qemuMigrationSrcPerformNative(virQEMUDriverPtr driver, qemuMigrationParamsPtr migParams) { qemuDomainObjPrivatePtr priv =3D vm->privateData; - virURIPtr uribits =3D NULL; + g_autoptr(virURI) uribits =3D NULL; int ret =3D -1; qemuMigrationSpec spec; =20 @@ -3862,7 +3862,7 @@ qemuMigrationSrcPerformNative(virQEMUDriverPtr driver, virReportError(VIR_ERR_INTERNAL_ERROR, _("missing scheme in migration URI: %s"), uri); - goto cleanup; + return -1; } =20 if (STREQ(uribits->scheme, "rdma")) { @@ -3870,13 +3870,13 @@ qemuMigrationSrcPerformNative(virQEMUDriverPtr driv= er, virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", _("outgoing RDMA migration is not supported " "with this QEMU binary")); - goto cleanup; + return -1; } if (!virMemoryLimitIsSet(vm->def->mem.hard_limit)) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("cannot start RDMA migration with no memory h= ard " "limit set")); - goto cleanup; + return -1; } } =20 @@ -3900,9 +3900,6 @@ qemuMigrationSrcPerformNative(virQEMUDriverPtr driver, if (spec.destType =3D=3D MIGRATION_DEST_FD) VIR_FORCE_CLOSE(spec.dest.fd.qemu); =20 - cleanup: - virURIFree(uribits); - return ret; } =20 --=20 2.26.2