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 6B11194046F for ; Thu, 23 Nov 2023 00:01:19 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=DXVPJ+2r21lLwZejIp+PlwuRIvY7kuYKexEAF16cjXk=; 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=1700697678; v=1; b=awIOsknCgDuRPjidN+JnDnrerNdxbjgKpoIMvnOMGysXi8MUebekWEW1bLACvtrSPgq0NmtQ lxuiXCACZ4SwrjNbsbl17ETc22dQE9xvCzl9RlnhdCmidpDTWuaSSAM8C4V7EArhVQl5O6Ceur4 IRBxC3V34nmhYXS2p89v4Ccs= X-Received: by 127.0.0.2 with SMTP id KkF4YY7687511xLgdI4JZg8W; Wed, 22 Nov 2023 16:01:18 -0800 X-Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.50]) by mx.groups.io with SMTP id smtpd.web11.79519.1700697677224430310 for ; Wed, 22 Nov 2023 16:01:17 -0800 X-Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-507cd62472dso1500426e87.0 for ; Wed, 22 Nov 2023 16:01:16 -0800 (PST) X-Gm-Message-State: pTrrVG8LfU9prLIFJwpddF0ox7686176AA= X-Google-Smtp-Source: AGHT+IFRLO6wUsQAfgEU4ooP3WRmivIDaU18dnORb5WePL5aEq5wS7M/sPOnghhcVC/2XY9pBidnFA== X-Received: by 2002:ac2:4906:0:b0:507:bd5f:a40a with SMTP id n6-20020ac24906000000b00507bd5fa40amr302358lfi.23.1700697675247; Wed, 22 Nov 2023 16:01:15 -0800 (PST) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id q19-20020a194313000000b0050a78dac3fasm10621lfa.12.2023.11.22.16.01.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 22 Nov 2023 16:01:14 -0800 (PST) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: abner.chang@amd.com, nicklew@nvidia.com, igork@ami.com Subject: [edk2-devel] [PATCH v2 1/3] RedfishPkg: fix memory leak in HiiUtilityLib Date: Thu, 23 Nov 2023 03:01:01 +0300 Message-Id: <20231123000103.31216-2-mike.maslenkin@gmail.com> In-Reply-To: <20231123000103.31216-1-mike.maslenkin@gmail.com> References: <20231123000103.31216-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=awIOsknC; 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/Library/HiiUtilityLib/HiiUtilityLib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RedfishPkg/Library/HiiUtilityLib/HiiUtilityLib.c b/RedfishPkg/= Library/HiiUtilityLib/HiiUtilityLib.c index 168b4459844f..fd322c2086d8 100644 --- a/RedfishPkg/Library/HiiUtilityLib/HiiUtilityLib.c +++ b/RedfishPkg/Library/HiiUtilityLib/HiiUtilityLib.c @@ -388,11 +388,13 @@ SetQuestionValue ( Question->Value.BufferLen =3D Question->StorageWidth;=0D Question->Value.Buffer =3D AllocateZeroPool (Question->StorageWid= th);=0D if (Question->Value.Buffer =3D=3D NULL) {=0D + FreePool (TemString);=0D return EFI_OUT_OF_RESOURCES;=0D }=0D =0D CopyMem (Question->Value.Buffer, TemString, StrSize (TemString));=0D Src =3D Question->Value.Buffer;=0D + FreePool (TemString);=0D } else {=0D CopyMem (&Question->Value.Value, &QuestionValue->Value, sizeof (EFI_= IFR_TYPE_VALUE));=0D Src =3D (UINT8 *)&Question->Value.Value;=0D --=20 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#111628): https://edk2.groups.io/g/devel/message/111628 Mute This Topic: https://groups.io/mt/102759077/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-