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 14F4DD80860 for ; Thu, 14 Dec 2023 23:25:10 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=TVnD//eZ//dqcmvehWb68o01S4+yncmVI+cC4FIvXB0=; 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=1702596309; v=1; b=F0WqnRXPRPbKaB40HC0bZsyVbA2zb2A7WzPJcQmP5cmFjfpUllljVFDPMx1LJWx7Furl+LHw 2BGKrQEOpaJJttAHOgFr/arolFeXl3PKTc/zh3TU+7h3oZux4QL222Tfk8exzhNcPfxcwxbRzt/ 0J+9H1sTbu0tg84TSYDxtwOk= X-Received: by 127.0.0.2 with SMTP id rMjuYY7687511xrxCjdRcBnM; Thu, 14 Dec 2023 15:25:09 -0800 X-Received: from mail-lj1-f170.google.com (mail-lj1-f170.google.com [209.85.208.170]) by mx.groups.io with SMTP id smtpd.web10.44679.1702596307353423491 for ; Thu, 14 Dec 2023 15:25:07 -0800 X-Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2c9f7fe6623so490071fa.3 for ; Thu, 14 Dec 2023 15:25:07 -0800 (PST) X-Gm-Message-State: rTVXVZJW1aIEdwyIMq7deSJMx7686176AA= X-Google-Smtp-Source: AGHT+IHflAxEBkwZnrldfH/WKj43j4pYbE7Bx/8Ae91PTNOYaHAJsoURCb1IYARoi/vf2ex6ZTJGBg== X-Received: by 2002:a05:6512:1287:b0:50d:1e87:81a with SMTP id u7-20020a056512128700b0050d1e87081amr3318644lfs.189.1702596305518; Thu, 14 Dec 2023 15:25:05 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id j24-20020ac24558000000b0050bfe5815e7sm1973119lfm.165.2023.12.14.15.25.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 14 Dec 2023 15:25:05 -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 v2 05/14] RedfishPkg: RedfishDiscoverDxe: fix memory leak on error path. Date: Fri, 15 Dec 2023 02:24:49 +0300 Message-Id: <20231214232458.4636-6-mike.maslenkin@gmail.com> In-Reply-To: <20231214232458.4636-1-mike.maslenkin@gmail.com> References: <20231214232458.4636-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=F0WqnRXP; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) 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 06d8d00da7fb..e344e06d8dcc 100644 --- a/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c +++ b/RedfishPkg/RedfishDiscoverDxe/RedfishDiscoverDxe.c @@ -829,6 +829,10 @@ AddAndSignalNewRedfishService ( } while (TRUE);=0D }=0D =0D + if (Char16Uuid !=3D NULL) {=0D + FreePool (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 @@ -907,10 +911,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 (#112554): https://edk2.groups.io/g/devel/message/112554 Mute This Topic: https://groups.io/mt/103181040/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-