From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 09904AC127B for ; Tue, 12 Dec 2023 14:54:33 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=Cl2hwgAGkOjZ0FyYombBF7FEF1XvHg0N7c5XzvglahU=; 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=1702392872; v=1; b=q5P+tawt2Ec0qvDwEtfSZJyoPWpXVj6Yxldn7/mnVzcLSr8Csz3n08RbSVAw1CcpUBqDmpUn 98v89YNECKTLPKmIOUsiX38wQOjc2uLyNcgqMa6NyRxMfZenTAMFJa9v6op3wULk7o/48hEka2t IjWlljpnCduzZSwGNkRWJFsg= X-Received: by 127.0.0.2 with SMTP id YJUmYY7687511xVLkCX7KtSM; Tue, 12 Dec 2023 06:54:32 -0800 X-Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by mx.groups.io with SMTP id smtpd.web11.3456.1702392871279363608 for ; Tue, 12 Dec 2023 06:54:31 -0800 X-Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-50bfa7f7093so7423727e87.0 for ; Tue, 12 Dec 2023 06:54:31 -0800 (PST) X-Gm-Message-State: Csak5dAPUsylPMhKAOfhDh0jx7686176AA= X-Google-Smtp-Source: AGHT+IEUs6IrcNqtIAyVJY+UjYkO3bjCUDal6u57H7bO/AlkN+kvZ9RkxhutinSc9bACWw1/plzppA== X-Received: by 2002:a05:6512:3191:b0:50d:1a1e:31ee with SMTP id i17-20020a056512319100b0050d1a1e31eemr4211022lfe.88.1702392869268; Tue, 12 Dec 2023 06:54:29 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id m21-20020a0565120a9500b0050d1d8674d2sm952008lfu.292.2023.12.12.06.54.28 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 12 Dec 2023 06:54:28 -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 5/9] RedfishPkg: RedfishDiscoverDxe: fix memory leak on error path. Date: Tue, 12 Dec 2023 17:54:08 +0300 Message-Id: <20231212145412.50434-6-mike.maslenkin@gmail.com> In-Reply-To: <20231212145412.50434-1-mike.maslenkin@gmail.com> References: <20231212145412.50434-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-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=q5P+tawt; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Cc: Abner Chang Cc: Nickle Wang Cc: Igor Kulchytskyy Signed-off-by: Mike Maslenkin --- 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 833ae2b969ff..d77af66cb479 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -862,6 +862,10 @@ AddAndSignalNewRedfishService ( } while (TRUE);=0D }=0D =0D + if (Char16Uuid !=3D NULL) {=0D + FreePool ((VOID *)Char16Uuid);=0D + }=0D +=0D if (NewFound || InfoRefresh) {=0D if (!InfoRefresh) {=0D DiscoveredList =3D (EFI_REDFISH_DISCOVERED_INTERNAL_LIST *)AllocateZ= eroPool (sizeof (EFI_REDFISH_DISCOVERED_INTERNAL_LIST));=0D @@ -940,10 +944,6 @@ AddAndSignalNewRedfishService ( }=0D }=0D =0D - if (Char16Uuid !=3D NULL) {=0D - FreePool ((VOID *)Char16Uuid);=0D - }=0D -=0D Status =3D EFI_SUCCESS;=0D if (NewFound || InfoRefresh) {=0D //=0D --=20 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112441): https://edk2.groups.io/g/devel/message/112441 Mute This Topic: https://groups.io/mt/103130783/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-