From nobody Mon Feb 9 00:07:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1613656619; cv=none; d=zohomail.com; s=zohoarc; b=PB/BdU13acw4zc+5VeCFAUbXy69fh7UwfiCa3mExjzy8JMJYd8XZoYxVhpPZTxShIgFuo8IF2v2w+n2UmsO3ZrVVJS7YnzfuTRnqgoMFIF5NCEH9WdNtAt8VNY/H3XW/i5rc0Lu7wkSs7+HLVMP3gVsuPyyKtqbZ8nbR8B5EiZU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1613656619; 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=xbNlG26K/6TCTrNF19vgqayZ3rvjvnS5vXez0v95A5E=; b=HqWLdTwzX/wedoaOFSSnL9jWnCHpklSWKFqfdYkRiPXZe9zv1xALkMuLaDD3tJclb9emqZJ5Vbq5zd2uSHI3ExMWj029D4cqJ5EkmBwEb79DnOZP6kRb+iqUhtdMmd8J7uAhnL/cv/FlNvjnQx5hBQjactN0rAPmSm47o1kLHPw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1613656619042102.74475146479836; Thu, 18 Feb 2021 05:56:59 -0800 (PST) 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-302-il19WNyRMeGeIVSalfmrrg-1; Thu, 18 Feb 2021 08:55:56 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 150E6100CCC5; Thu, 18 Feb 2021 13:55:51 +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 E3FAA50EDF; Thu, 18 Feb 2021 13:55:50 +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 A113A18095CE; Thu, 18 Feb 2021 13:55:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11IDtaNQ026282 for ; Thu, 18 Feb 2021 08:55:36 -0500 Received: by smtp.corp.redhat.com (Postfix) id CB60B5B4B0; Thu, 18 Feb 2021 13:55:36 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 54A7460BD8 for ; Thu, 18 Feb 2021 13:55:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613656558; 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=xbNlG26K/6TCTrNF19vgqayZ3rvjvnS5vXez0v95A5E=; b=VCH32iuYqqaue/rGvrof9a5m+OmZwdr0ANv/GE5iIDYmRSqB/EQQ/+wfz6gJigfBxB8EYO 80KUI1+I6ef1O3BNHTUjQfOfXi/nAdtOZJBacQoL9nVmuZFw4Fp+xEG0k9gW5YIxxC1vVP bGYePXfjKW6Lujoj+cnPUY/y0xs6YfY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1613656616; 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=xbNlG26K/6TCTrNF19vgqayZ3rvjvnS5vXez0v95A5E=; b=XkoohWeuxCnDAcw+ckNe/2SQdgQ1GSjgWgA1DPM1/umA+d3GAxxrb/hEn7qyvH8ZXSxTVx wqixhuVkC1HgUQiXN8mIWPfPTpCLUQOBWvjTVBdd6EYuW+XP2uwawXMohDTjfeySa+TnL9 UNCIakJyxHkatmvFlvZSP9JPhm294GM= X-MC-Unique: il19WNyRMeGeIVSalfmrrg-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 1/4] security: dac: remove leftover virPCIDeviceFree Date: Thu, 18 Feb 2021 14:55:26 +0100 Message-Id: <15ae708bce350b8cbe270de601ffc9c770086730.1613656486.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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.11 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) (identity @redhat.com) The switch to g_auto left this one call behind. Reported by Coverity. Fixes: 4ab0d1844a1e60def576086edc8b2c3775e7c10d Signed-off-by: J=C3=A1n Tomko --- src/security/security_dac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/security/security_dac.c b/src/security/security_dac.c index 00eeae0d27..11f6c5c3da 100644 --- a/src/security/security_dac.c +++ b/src/security/security_dac.c @@ -1430,10 +1430,9 @@ virSecurityDACRestoreHostdevLabel(virSecurityManager= Ptr mgr, if (pcisrc->backend =3D=3D VIR_DOMAIN_HOSTDEV_PCI_BACKEND_VFIO) { g_autofree char *vfioGroupDev =3D virPCIDeviceGetIOMMUGroupDev= (pci); =20 - if (!vfioGroupDev) { - virPCIDeviceFree(pci); + if (!vfioGroupDev) return -1; - } + ret =3D virSecurityDACRestoreFileLabelInternal(mgr, NULL, vfioGroupDev, fal= se); } else { --=20 2.26.2