From nobody Sat Feb 7 05:48:47 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; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1591868689; cv=none; d=zohomail.com; s=zohoarc; b=law1OpviT2E6Fgy0P8vkEWKvkW6wuQXGAncZVPNXez/pU57GwuDa4POtoivUPF7emhoLh2MvhPjGK7snL4c1fAZCN26qml2UYhFvdxkZWEzyYC78etwg2ky0RivrXeUnBn5PNBFMY1s/3wKDW7oOQ/AymSrvk2gg9lE4I5i1seA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1591868689; 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=ttnlm7hOnp2KxYLEq9ptwZP6gOiRgxanF/xUOXVp90A=; b=UtGz7gb6649zesFyazBq7ib0VJ5NTfCp0pT3iocmAkkaalJsT28yEPOeCPQ+QaSnpp7Vhb16GHqWWQuupKa8jvOb8EDChmaL81Y/yFpLTVaEPueegVj9H1w54hBDL8OLVLeLsCtYxlmjMME25/2Qz/3YOdiOQzC9WPTw28OHpiM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass 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 1591868689165925.4721993635139; Thu, 11 Jun 2020 02:44:49 -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-298-pJ5GaiOUPVe-swhiTEHAwQ-1; Thu, 11 Jun 2020 05:44:45 -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 855C18018A5; Thu, 11 Jun 2020 09:44:40 +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 64D765C5D9; Thu, 11 Jun 2020 09:44:40 +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 35F02B34B9; Thu, 11 Jun 2020 09:44:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 05B9hmwL030255 for ; Thu, 11 Jun 2020 05:43:48 -0400 Received: by smtp.corp.redhat.com (Postfix) id 22FE87C3B7; Thu, 11 Jun 2020 09:43:48 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8BF1378914 for ; Thu, 11 Jun 2020 09:43:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1591868687; 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=ttnlm7hOnp2KxYLEq9ptwZP6gOiRgxanF/xUOXVp90A=; b=IlwB2maF653swTgvBti2klw4Fdnxp/9J/gtanY+qYgAprv/aBrSy5jKhz7rCgtjFjmxjWJ TXP1snSlH0E2kt8zE5fV508maybTEaj8BW8q+nNnkYJXAfak7oPJ/PufLdOAokeiotgt1b b2nMgybuwFD7BfllyM/MhP5VjzTB518= X-MC-Unique: pJ5GaiOUPVe-swhiTEHAwQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/7] virTPMEmulatorInit: Don't use temporary variable to free path Date: Thu, 11 Jun 2020 11:43:36 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com 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 X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Use VIR_FREE directly. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/util/virtpm.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/util/virtpm.c b/src/util/virtpm.c index c734bf941a..71c1a2ecb3 100644 --- a/src/util/virtpm.c +++ b/src/util/virtpm.c @@ -290,7 +290,6 @@ virTPMEmulatorInit(void) g_autofree char *path =3D NULL; bool findit =3D *prgs[i].path =3D=3D NULL; struct stat statbuf; - char *tmp; if (!findit) { /* has executables changed? */ @@ -303,9 +302,7 @@ virTPMEmulatorInit(void) } if (findit) { - tmp =3D *prgs[i].path; - VIR_FREE(tmp); - *prgs[i].path =3D NULL; + VIR_FREE(*prgs[i].path); path =3D virFindFileInPath(prgs[i].name); if (!path) { --=20 2.26.2