From nobody Mon Feb 9 16:19:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+112864+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112864+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1703458779; cv=none; d=zohomail.com; s=zohoarc; b=PxwpG8CFPqC1JCcr1FLylkWg904DdkDeKwMrX5sgRI4dVrTL/Q5RLAePIpdS/iSyEK6pORsm6NNeABCN6iaaLFdbRR4A45PWsnmxTQFspmaJUNuazrLIwsSo7r09yAQlsWH3JRrNdnO7+5PFHf1CXGGATjt/38+NT6gvdFygtlY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1703458779; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Sender:Subject:Subject:To:To:Message-Id; bh=3Ps6EOPEEr85F9zoKwohqjNHhYLjwRxJ0xAc+YNy96I=; b=cIWYg0RMBUML+zKlizwuXVeyky2og07SDw+Jw5KrD4nP0VZzcoeT2z99BEHTSnAQY/93qLkt+IIg7nFZPOpAZOvjJ7YZ8J+PJp+NMmklNiIOVa6zB48lK2Utf8f8/TrPOw9xkVRD2c4IGNei2pTI1K1IdkNrdIIzQDNYtvzZbCA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+112864+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1703458779486654.2904010307367; Sun, 24 Dec 2023 14:59:39 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=f03gn8I47QaozYo/LnOnLowQ4+CdM4Lzh7WKkzXWd+M=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1703458779; v=1; b=e4ParS6gvi0Tv4omzMINcepRhWgznC7w3mJBx+no2enZlL1Bxdsg97bqjvrQiBxkE/u9xONq BDJwuq1+gpKZoktPTFQ7nY7PhwtUygyf8Al3Zes3icCG+GC5DC/k9u92aR06+pKTIAuzcSZnpq2 9guw77UO8w06kbcMOluvJ++8= X-Received: by 127.0.0.2 with SMTP id UYcKYY1788612xC9NAo7bhQv; Sun, 24 Dec 2023 14:59:39 -0800 X-Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by mx.groups.io with SMTP id smtpd.web11.35797.1703458777129393265 for ; Sun, 24 Dec 2023 14:59:37 -0800 X-Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-50e7d6565b5so27510e87.0 for ; Sun, 24 Dec 2023 14:59:36 -0800 (PST) X-Gm-Message-State: kPKNlKoQh3eDdrvONy1ru2i3x1787277AA= X-Google-Smtp-Source: AGHT+IEeRo0cyEodqJw7iuZPqOZy1I8FVoN9I2TgTCxLNgkO4/MublI7QKSsE9gYSrUg9YIhJnkAMA== X-Received: by 2002:a05:6512:614:b0:50e:76ac:18a7 with SMTP id b20-20020a056512061400b0050e76ac18a7mr504888lfe.130.1703458775145; Sun, 24 Dec 2023 14:59:35 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id be44-20020a056512252c00b0050e78f5178asm326596lfb.262.2023.12.24.14.59.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 24 Dec 2023 14:59:34 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com, Mike Maslenkin Subject: [edk2-devel] [PATCH v3 05/16] RedfishPkg: RedfishDiscoverDxe: fix memory leak on error path. Date: Mon, 25 Dec 2023 01:59:16 +0300 Message-Id: <20231224225927.9119-6-mike.maslenkin@gmail.com> In-Reply-To: <20231224225927.9119-1-mike.maslenkin@gmail.com> References: <20231224225927.9119-1-mike.maslenkin@gmail.com> MIME-Version: 1.0 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,mike.maslenkin@gmail.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1703458780424100021 Content-Type: text/plain; charset="utf-8" Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin Reviewed-by: Abner Chang --- RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c b/RedfishPk= g/RedfishDiscoverDxe/RedfishDiscoverDxe.c index 06d8d00da7fb..e344e06d8dcc 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -829,6 +829,10 @@ AddAndSignalNewRedfishService ( } while (TRUE); } =20 + if (Char16Uuid !=3D NULL) { + FreePool (Char16Uuid); + } + if (NewFound || InfoRefresh) { if (!InfoRefresh) { DiscoveredList =3D (EFI_REDFISH_DISCOVERED_INTERNAL_LIST *)AllocateZ= eroPool (sizeof (EFI_REDFISH_DISCOVERED_INTERNAL_LIST)); @@ -907,10 +911,6 @@ AddAndSignalNewRedfishService ( } } =20 - if (Char16Uuid !=3D NULL) { - FreePool ((VOID *)Char16Uuid); - } - Status =3D EFI_SUCCESS; if (NewFound || InfoRefresh) { // --=20 2.32.0 (Apple Git-132) -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112864): https://edk2.groups.io/g/devel/message/112864 Mute This Topic: https://groups.io/mt/103354124/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-