From nobody Sun Feb 8 14:56:19 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.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=1655876147; cv=none; d=zohomail.com; s=zohoarc; b=i1pmQKl3MZwVbDmLx7zxTgjoiCmqvoFkSWcaJshQ7QZ/SrrgdhBGJlgAfAMZ0eSqzKJg271v2DWxf7cIYCTGaZuJyKIA+3NSl13bOSWcasRVdTgW8yab+5ATp+OnCAY5j2yz3pxM1GsGP0YwugwPy2g6jSyR7fzH4My3x5Paz64= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1655876147; 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=Q0vMUdERQFLj4f1O5piDhcfOtyYOfWJKxur9zwH+u+U=; b=ghkyH1jPIyZFsXZV1wO1kd20cgIPaIFa18XL7XOB98g1AKJ1xoD1j2/xODIaN9WOVB0Po2rgJd/JgYS6TentzKhyfnu+2IpnNmPStUE/7P9XfCU7ysWfybgJ4LKa65EFw5t4vhj9EfOVBtl3BpDfayysbpWLgBpEoNdQ8N3SNAc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.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.133.124]) by mx.zohomail.com with SMTPS id 1655876147265456.3961746976321; Tue, 21 Jun 2022 22:35:47 -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-84-3XfbO2knNNGuhOL-7nzIiw-1; Wed, 22 Jun 2022 01:35:43 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id CA62A81F46D; Wed, 22 Jun 2022 05:35:41 +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 B5C1F2026D64; Wed, 22 Jun 2022 05:35:41 +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 6A131194704C; Wed, 22 Jun 2022 05:35:41 +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 C00761947042 for ; Wed, 22 Jun 2022 05:35:38 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id A20A1112131E; Wed, 22 Jun 2022 05:35:38 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.85]) by smtp.corp.redhat.com (Postfix) with ESMTP id 499D11121314 for ; Wed, 22 Jun 2022 05:35:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1655876146; 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=Q0vMUdERQFLj4f1O5piDhcfOtyYOfWJKxur9zwH+u+U=; b=YL84TXrqrqesk+3yS2xUK0YajB79jomhw9f3cv0Tx/2XPkX+d4Ix0RLFH3EUq/ttHS6bGj pm3Y2g8q11R+LtHgRh4MORll1eRw3863zg/RC2B1YzJ5GBekAZJsaBZeftAa7FMkutJriu oBYZ/Er6Yx6UEvx7ZBZtMai7Pc+00vM= X-MC-Unique: 3XfbO2knNNGuhOL-7nzIiw-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 4/6] vmx: use g_autofree in virVMXParseSerial Date: Wed, 22 Jun 2022 07:35:32 +0200 Message-Id: <462c40006bea33947f2109d1396e7e5255eae4aa.1655876067.git.jtomko@redhat.com> 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.4 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: 1655876148082100007 Signed-off-by: J=C3=A1n Tomko --- src/vmx/vmx.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c index 282e9562e0..43ddee5bb6 100644 --- a/src/vmx/vmx.c +++ b/src/vmx/vmx.c @@ -2895,13 +2895,13 @@ virVMXParseSerial(virVMXContext *ctx, virConf *conf= , int port, bool startConnected =3D false; =20 char fileType_name[48] =3D ""; - char *fileType =3D NULL; + g_autofree char *fileType =3D NULL; =20 char fileName_name[48] =3D ""; - char *fileName =3D NULL; + g_autofree char *fileName =3D NULL; =20 char network_endPoint_name[48] =3D ""; - char *network_endPoint =3D NULL; + g_autofree char *network_endPoint =3D NULL; =20 g_autoptr(virURI) parsedUri =3D NULL; =20 @@ -3048,10 +3048,6 @@ virVMXParseSerial(virVMXContext *ctx, virConf *conf,= int port, g_clear_pointer(def, virDomainChrDefFree); } =20 - VIR_FREE(fileType); - VIR_FREE(fileName); - VIR_FREE(network_endPoint); - return result; } =20 --=20 2.34.1