From nobody Sat Feb 7 11:17:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; 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 205.139.110.61 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=1594633862; cv=none; d=zohomail.com; s=zohoarc; b=ZQjv47jt35ep2F+qFNkAtJiydoNIYOg5seAoMDn/a7Ftpo9ZmWP6SfXrZGuHjkQ3QglcYd+1Td6AWB924AIhodwS/vVmNq5otJvK7T86AGpCdNmie82Som+/AQENkcyBF7iBXu7TG+qas1vY1UQGz68u0/ZElBLxiA3dA2euZGI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594633862; 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=z2kpPrFb+P+I3LpJvTUNrFtHtIP0hj4atkZ9OjshUvM=; b=AZBbosIAuUk1Pt0e0K7geKYltEL0vH2v5XirpVj4OrTP8AFrfA146Xs+meiscBdW0+GUJsmS1nv8cmu0dQlqwA08syZLS1anHmxmNUOFXQHyWLTnZncY7M2EIN06lX222GgV5Z7SS9eABCppPdEqeMQTUt11TiVHIEmwzZSYFqM= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1594633862404141.0333402273351; Mon, 13 Jul 2020 02:51:02 -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-224-D464Hor9PKqtEVNZvtATww-1; Mon, 13 Jul 2020 05:50:59 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8DCD319200CC; Mon, 13 Jul 2020 09:50:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6B83D19D61; Mon, 13 Jul 2020 09:50:53 +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 33F361806B0C; Mon, 13 Jul 2020 09:50:53 +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 06D9oXV3005775 for ; Mon, 13 Jul 2020 05:50:33 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6A05B20A0535; 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 454A52097D6C for ; Mon, 13 Jul 2020 09:50:27 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (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 AB85C81B4CF for ; Mon, 13 Jul 2020 09:50:26 +0000 (UTC) Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-118-ZdXfvlJKNV2CoVlBpUczng-1; Mon, 13 Jul 2020 05:50:23 -0400 Received: by mail-qt1-f194.google.com with SMTP id j10so9406831qtq.11 for ; Mon, 13 Jul 2020 02:50:23 -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.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jul 2020 02:50:22 -0700 (PDT) X-MC-Unique: D464Hor9PKqtEVNZvtATww-1 X-MC-Unique: ZdXfvlJKNV2CoVlBpUczng-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=z2kpPrFb+P+I3LpJvTUNrFtHtIP0hj4atkZ9OjshUvM=; b=W3iHxKMz186ToQpaqLaOPtIebJcbe+HpSWMDnr5D7Ln/2zpLTlBBw5PBM8i2hkiBVO /vulW27nMVYKw3lfnRewj1GcXoyZPvJcDNwsBMlJxBHZHXEa3EWkQleqlz8RyLdPfush kjoeVU0swG9MiHrhzi/S/14/luuCMm/R+MdpmYMxXtZTPIsIdU/c9o95keyCOAaV3ajC du7YGBIWfXYMgdwL1biW8i4yT8YOW8t2mKSk+egAM04nVFeJgEwMKdgs0Q2SfY9znQM6 PrjNaM8h3kD7XglF3CDW3gYGrqaNf4bgpeTTbn9xmxGJkcVWYmhxk0oEwNTx4MBpa1rz sopQ== X-Gm-Message-State: AOAM530/l3kCGjph9FpXYuG5/nf5P/g9qN2y9NSh0jaN0mb0OiAPTO1S hBiuF49vVdmcO9YmDZWA+h2mGdScyhA= X-Google-Smtp-Source: ABdhPJxzThEZl8H8oW39rjGUWjPVZdnINUY9dGPzBYA+ltBxOZdBYKhvKVrX4KnBPgorxlKrAVwIew== X-Received: by 2002:ac8:3893:: with SMTP id f19mr85676311qtc.184.1594633823044; Mon, 13 Jul 2020 02:50:23 -0700 (PDT) From: Daniel Henrique Barboza To: libvir-list@redhat.com Subject: [PATCH v1 11/25] qemu_migration_params.c: use g_autofree in qemuMigrationParamsApply() Date: Mon, 13 Jul 2020 06:49:43 -0300 Message-Id: <20200713094957.1648405-12-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.84 on 10.5.11.23 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_params.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/qemu/qemu_migration_params.c b/src/qemu/qemu_migration_par= ams.c index b1518f82c0..aea17b1ac8 100644 --- a/src/qemu/qemu_migration_params.c +++ b/src/qemu/qemu_migration_params.c @@ -836,8 +836,8 @@ qemuMigrationParamsApply(virQEMUDriverPtr driver, { qemuDomainObjPrivatePtr priv =3D vm->privateData; bool xbzrleCacheSize_old =3D false; - virJSONValuePtr params =3D NULL; - virJSONValuePtr caps =3D NULL; + g_autoptr(virJSONValue) params =3D NULL; + g_autoptr(virJSONValue) caps =3D NULL; qemuMigrationParam xbzrle =3D QEMU_MIGRATION_PARAM_XBZRLE_CACHE_SIZE; int ret =3D -1; int rc; @@ -896,9 +896,6 @@ qemuMigrationParamsApply(virQEMUDriverPtr driver, if (xbzrleCacheSize_old) migParams->params[xbzrle].set =3D true; =20 - virJSONValueFree(params); - virJSONValueFree(caps); - return ret; } =20 --=20 2.26.2