From nobody Sun Feb 8 15:54:18 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=1654087929; cv=none; d=zohomail.com; s=zohoarc; b=JVx1Ay3xmXJ5bBtsTo79aHDZJWV8pukjbzuRj1fvFHRbTtx46nCG6q1AakiUMtjngA9xhF5aWSwd2dkQhNbYRcR7jTzqf7Z1GJCUJNVBjBNjMOvn7PiAZ52Kt1q4VP391nrOz44shbbJRWs/khr9Aulkd9ipOrXod7PfjIoSx+8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1654087929; 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=sxXVVsMhIv3KtFpMlI0kU5P3bLcJUew0H2dWoLc3HCQ=; b=dP52DJK8LGJ1W6fTmw/MgXJpoJXfMt5Htx0AsycpZ835Il8v1n7b6QBMJ7cXAWCAkU20r5/HCSxqhMhZO0Kqys+6sSGYfJnr+y22+LGVgrvA8BPC207H2MFzyXp/bWrufc9BZnQyw7MW4mR2LkuyFACl1t5YJ4Anig+KbcYw7Wc= 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 1654087929816976.9657696148458; Wed, 1 Jun 2022 05:52:09 -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-370-Op0UxnrMOLuOBtBh0nadXQ-1; Wed, 01 Jun 2022 08:51:36 -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 CC2878853CE; Wed, 1 Jun 2022 12:50:53 +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 B80161121314; Wed, 1 Jun 2022 12:50:53 +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 24A1E1947B88; Wed, 1 Jun 2022 12:50:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 62F8B1947B90 for ; Wed, 1 Jun 2022 12:50:31 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3E20240EC004; Wed, 1 Jun 2022 12:50:31 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.227]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1DE7740EC007 for ; Wed, 1 Jun 2022 12:50:31 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id AFFF6245B89; Wed, 1 Jun 2022 14:50:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654087928; 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=sxXVVsMhIv3KtFpMlI0kU5P3bLcJUew0H2dWoLc3HCQ=; b=REEmQKyxJGYB6MS48mKwFjFacX8wFf7InASssYuJXV+7FoiPVQxOq/GFf1+jNi/kZ2e15b lvEYkydCPWMFsAA7CP9Z2amwyfJk8qOHPOeNOsHRNlTHX36HmePHqozE2oKhTs7tSDmGx4 tihfjJgM3CG1KYq2G06pGY5YMSINq9M= X-MC-Unique: Op0UxnrMOLuOBtBh0nadXQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH v2 60/81] qemu: Use autoptr for mig in qemuMigrationDstPrepareFresh Date: Wed, 1 Jun 2022 14:50:00 +0200 Message-Id: <6a66ecde73b837b43a4160069dd44bc96a8d0340.1654087150.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1654087930162100007 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- Notes: Version 2: - replaces [62/80] qemu: Simplify cleanup in qemuMigrationDstPrepareFresh - it's the same patch with different commit message and changes touching origErr removed :-) src/qemu/qemu_migration.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 53236b7239..e888384570 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -3299,7 +3299,7 @@ qemuMigrationDstPrepareFresh(virQEMUDriver *driver, virErrorPtr origErr; int ret =3D -1; qemuDomainObjPrivate *priv =3D NULL; - qemuMigrationCookie *mig =3D NULL; + g_autoptr(qemuMigrationCookie) mig =3D NULL; g_autofree char *xmlout =3D NULL; unsigned int cookieFlags =3D 0; bool taint_hook =3D false; @@ -3451,7 +3451,6 @@ qemuMigrationDstPrepareFresh(virQEMUDriver *driver, qemuDomainRemoveInactive(driver, vm); } virDomainObjEndAPI(&vm); - qemuMigrationCookieFree(mig); virErrorRestore(&origErr); return ret; =20 --=20 2.35.1