From nobody Sun Feb 8 10:00:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1594633858; cv=none; d=zohomail.com; s=zohoarc; b=DD8SvKIJnltqGzZeJYaG2K8GJXO0Dz2pSJ+pEN+f83oT8cqIBJHCCz2UEhXEoNanAvj6/aFa15GwYIyNdt2WJ4lXxdkOvjSNPHESApI1EJ1wDByY6JQWbGWiHUrnut78WqBFatumxWsCAFzUi8eW5HHZRRj3Rk/IlOBN0JpMldA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594633858; 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=uwA05zRZjoNll374txY7HFpjiHKWj9jF7erYap4WXFs=; b=EQ49RsJqckyFUL+PKF5ECwkgqVCDPGbg/eyc3ntw1wq6cbwksiFSsacUse6zHO/bDMVZiyP8MU1LCVl8DWvvtvqoO1KtPQkXNwaNUKD2MLk15nsCiGa1ErUiNLQDZT492XrGUWubSDbDOkDh6+2Nn2K1GKVY9zZDe9QwX7ZC6b0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1594633858533677.4066804849226; Mon, 13 Jul 2020 02:50:58 -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-486-M88vdYMjOqmnP1jGkaKRyA-1; Mon, 13 Jul 2020 05:50:55 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CD6E619200D1; Mon, 13 Jul 2020 09:50:49 +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 ADEA727DE8B; Mon, 13 Jul 2020 09:50:49 +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 7ED5E94F0C; Mon, 13 Jul 2020 09:50:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06D9oXC5005776 for ; Mon, 13 Jul 2020 05:50:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8ED1520A053B; Mon, 13 Jul 2020 09:50:33 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast02.extmail.prod.ext.rdu2.redhat.com [10.11.55.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5B7B62097D97 for ; Mon, 13 Jul 2020 09:50:29 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.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 0AF47805B9A for ; Mon, 13 Jul 2020 09:50:29 +0000 (UTC) Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-457-XOlnbwYUOEe5DFX_1FdM_g-1; Mon, 13 Jul 2020 05:50:26 -0400 Received: by mail-qt1-f195.google.com with SMTP id i3so9403186qtq.13 for ; Mon, 13 Jul 2020 02:50:26 -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.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 02:50:25 -0700 (PDT) X-MC-Unique: M88vdYMjOqmnP1jGkaKRyA-1 X-MC-Unique: XOlnbwYUOEe5DFX_1FdM_g-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=uwA05zRZjoNll374txY7HFpjiHKWj9jF7erYap4WXFs=; b=q2yMAXxYQMXTb9c7Zqath5sQvOywGEqge0lkdCAuzIIz6mUeVzZhEoRquQIUrEMQlD VG0mDHierP0vXQRtO6bFxhrwEOBaO1abLueH18jkQYG9viRfj7jBrmSBZVNSL6voAEgP Gy9dEkFUhaOnEymUKaSpVUPixPsl1v4Sa9nMqir/pADLgMWuQf8rCqJp0yYktbx6VQJ2 D+l/kU95p3E2VyqrmKD+UNBW8tF/EEP/weGqhODtknQkZnikIA5LKLxSFcDfO7px5kVD qFmQ9mXMX3uQMiUorc6Do7bj4aryBKl5R66tOJLBb7gG9b6JgvlN8f7F0XPsnWKZRqdC baMQ== X-Gm-Message-State: AOAM532W3Wjoozb41If/e2JEHaBUjW16CpxjVld3A90dZBnikOl5y4hr Nwuj+tn3atQhC9GyM6X28MuU9lTRiME= X-Google-Smtp-Source: ABdhPJyT6o5MWTP62X869mT2ZilLw/Lr3nD9AwCmq+RLUeah9GogVsOZKEVi8xL/x35Gvw7nmfgg2A== X-Received: by 2002:ac8:7959:: with SMTP id r25mr33439861qtt.85.1594633826058; Mon, 13 Jul 2020 02:50:26 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 13/25] qemu_migration.c: use g_auto* in qemuMigrationDstPrepareDirect() Date: Mon, 13 Jul 2020 06:49:45 -0300 Message-Id: <20200713094957.1648405-14-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.78 on 10.11.54.4 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.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Signed-off-by: Daniel Henrique Barboza --- src/qemu/qemu_migration.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 83a25e7a8f..28081c1b4f 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2810,10 +2810,10 @@ qemuMigrationDstPrepareDirect(virQEMUDriverPtr driv= er, { unsigned short port =3D 0; bool autoPort =3D true; - char *hostname =3D NULL; + g_autofree char *hostname =3D NULL; int ret =3D -1; - virURIPtr uri =3D NULL; - virQEMUDriverConfigPtr cfg =3D virQEMUDriverGetConfig(driver); + g_autoptr(virURI) uri =3D NULL; + g_autoptr(virQEMUDriverConfig) cfg =3D virQEMUDriverGetConfig(driver); const char *migrateHost =3D cfg->migrateHost; =20 VIR_DEBUG("driver=3D%p, dconn=3D%p, cookiein=3D%s, cookieinlen=3D%d, " @@ -2928,9 +2928,6 @@ qemuMigrationDstPrepareDirect(virQEMUDriverPtr driver, nmigrate_disks, migrate_disks, nbdPor= t, migParams, flags); cleanup: - virURIFree(uri); - VIR_FREE(hostname); - virObjectUnref(cfg); if (ret !=3D 0) { VIR_FREE(*uri_out); if (autoPort) --=20 2.26.2