From nobody Sun Nov 16 05:54:38 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1598531050; cv=none; d=zohomail.com; s=zohoarc; b=EwB8RjPD8HNvGUm7VwPmz6b3IQ5KkDiGPh5jbGyVmKwrblMGnJ6nFWj8Sbf6f95RVE1MDp8OMvIobGdni3blVAy2ssMpyY5N/pU+ps6LIR4fhw4XLogBsMHQwzdVZt9i/xabDfrtbQIKADxO2E934DZprlHWWEx+n+c73TWxuPQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1598531050; 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=sbSzSoow6/kRln4luzSwvB2WGRnE1p1UFQnYpmEWyy4=; b=Jhb5RpJ+xi/RVWkUxEEPQkAfRDeNBhZbdIccjNoGvd0a3aGkGC/rw5LLvGKV4aKe9ZGDHoLuZ4xWO8kUXGPrVUe9HXU12BAZqMdvjLd9MZfYOrs0C8nu3CdIImBRWceyiBW60xvbB5GsiqNWaLPmIgB/dd3bZBjSM+hoJNLuYfc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1598531050918769.0186352609124; Thu, 27 Aug 2020 05:24:10 -0700 (PDT) Received: from localhost ([::1]:46272 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kBGwr-0000I2-Hr for importer@patchew.org; Thu, 27 Aug 2020 08:24:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54560) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kBGu3-00056T-Oa for qemu-devel@nongnu.org; Thu, 27 Aug 2020 08:21:16 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:57402 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kBGu1-0003Z4-TE for qemu-devel@nongnu.org; Thu, 27 Aug 2020 08:21:15 -0400 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-48-9n5ScJmzP0OHFSXxdYxWIg-1; Thu, 27 Aug 2020 08:21:10 -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 D3B8A189E614; Thu, 27 Aug 2020 12:21:08 +0000 (UTC) Received: from localhost (ovpn-113-237.ams2.redhat.com [10.36.113.237]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1ED811972A; Thu, 27 Aug 2020 12:21:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598530872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sbSzSoow6/kRln4luzSwvB2WGRnE1p1UFQnYpmEWyy4=; b=OvPUhxS1zgqBOGW7gPMFdbS5GEGTxIRqg0jRcG8o+rH4zyTt9J0oOix9Ub+lTyGBQdEv6a FbsR5w4TDaCQedLAOx0i+VpPMyUnQXA5trAWWzttvIigCtzMDxozbXfGHCLGHShn3zR3Es il+AzuUgQf7yGULiQEMRmzxdpI84Gac= X-MC-Unique: 9n5ScJmzP0OHFSXxdYxWIg-1 From: Cornelia Huck To: Peter Maydell Subject: [PULL 3/3] hw/vfio/ap: Plug memleak in vfio_ap_get_group() Date: Thu, 27 Aug 2020 14:20:57 +0200 Message-Id: <20200827122057.232662-4-cohuck@redhat.com> In-Reply-To: <20200827122057.232662-1-cohuck@redhat.com> References: <20200827122057.232662-1-cohuck@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=cohuck@redhat.com X-Mimecast-Spam-Score: 0.0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=205.139.110.120; envelope-from=cohuck@redhat.com; helo=us-smtp-1.mimecast.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/27 00:13:19 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.959, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pierre Morel , Pan Nengyuan , Cornelia Huck , Li Qiang , qemu-devel@nongnu.org, qemu-s390x@nongnu.org, Euler Robot Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Pan Nengyuan Missing g_error_free() in vfio_ap_get_group() error path. Fix that. Reported-by: Euler Robot Signed-off-by: Pan Nengyuan Reviewed-by: Pierre Morel Reviewed-by: Li Qiang Message-Id: <20200814160241.7915-3-pannengyuan@huawei.com> Signed-off-by: Cornelia Huck --- hw/vfio/ap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index b9330a8e6fc8..cec6fe159932 100644 --- a/hw/vfio/ap.c +++ b/hw/vfio/ap.c @@ -71,6 +71,7 @@ static VFIOGroup *vfio_ap_get_group(VFIOAPDevice *vapdev,= Error **errp) if (!group_path) { error_setg(errp, "%s: no iommu_group found for %s: %s", VFIO_AP_DEVICE_TYPE, vapdev->vdev.sysfsdev, gerror->mes= sage); + g_error_free(gerror); return NULL; } =20 --=20 2.25.4