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 1BEBAD80090 for ; Sun, 27 Aug 2023 10:57:27 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=BrFxN8A7vMSHdLKmFcKekjTEqx2vGbFL8jslNS0LbZQ=; 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=1693133846; v=1; b=GMvCkToSJmQpHgZp1b6xfqM7f+goEftJRXxRUTZX0jjb9cHuAYchJI4MpqsBnqPsr3HEUrmi rDzl47Y6Zot2o4ObUK6VIYywFk2ebgSk8t69AY+rKdrXel+6GGHPZGJVSw16osRFEZ8xx587N7x aKQ94idVoqoAhKB0rzgaZCww= X-Received: by 127.0.0.2 with SMTP id ECzYYY7687511xquG2l1OoGp; Sun, 27 Aug 2023 03:57:26 -0700 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.web10.25220.1693133845994867964 for ; Sun, 27 Aug 2023 03:57:26 -0700 X-Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-50098cc8967so3685217e87.1 for ; Sun, 27 Aug 2023 03:57:25 -0700 (PDT) X-Gm-Message-State: Rss5FDxiKXqj3NOz2yPRRCwKx7686176AA= X-Google-Smtp-Source: AGHT+IFkM4gTuE8pizkiDMbjasqWNJyGWe8Zxz76aeDWgTRaOcqPp2qnFI7QqZWwhW0a/NpNOFLrDA== X-Received: by 2002:a05:6512:2252:b0:500:8ffe:7486 with SMTP id i18-20020a056512225200b005008ffe7486mr11181607lfu.4.1693133843905; Sun, 27 Aug 2023 03:57:23 -0700 (PDT) X-Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id i11-20020ac2522b000000b004fb9fe34c27sm1085825lfl.92.2023.08.27.03.57.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sun, 27 Aug 2023 03:57:23 -0700 (PDT) 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 4/5] RedfishClientPkg: fix memory leak during EFI variables write. Date: Sun, 27 Aug 2023 13:56:39 +0300 Message-Id: <20230827105640.94731-5-mike.maslenkin@gmail.com> In-Reply-To: <20230827105640.94731-1-mike.maslenkin@gmail.com> References: <20230827105640.94731-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=GMvCkToS; 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) Signed-off-by: Mike Maslenkin --- .../RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c | 6 +++++- RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapD= xe.c b/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c index 86684cc72e1e..6a72afed8715 100644 --- a/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c +++ b/RedfishClientPkg/RedfishConfigLangMapDxe/RedfishConfigLangMapDxe.c @@ -424,7 +424,11 @@ SaveConfigLangMapList ( gRT->SetVariable (VariableName, &gEfiRedfishClientVariableGuid, VARIAB= LE_ATTRIBUTE_NV_BS, 0, NULL);=0D }=0D =0D - return gRT->SetVariable (VariableName, &gEfiRedfishClientVariableGuid, V= ARIABLE_ATTRIBUTE_NV_BS, VarSize, (VOID *)VarData);=0D + Status =3D gRT->SetVariable (VariableName, &gEfiRedfishClientVariableGui= d, VARIABLE_ATTRIBUTE_NV_BS, VarSize, (VOID *)VarData);=0D +=0D + FreePool (VarData);=0D +=0D + return Status;=0D }=0D =0D /**=0D diff --git a/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c b/RedfishClie= ntPkg/RedfishETagDxe/RedfishETagDxe.c index 7ac6e885dea6..a892ced984c8 100644 --- a/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c +++ b/RedfishClientPkg/RedfishETagDxe/RedfishETagDxe.c @@ -411,7 +411,11 @@ SaveETagList ( gRT->SetVariable (VariableName, &gEfiRedfishClientVariableGuid, VARIAB= LE_ATTRIBUTE_NV_BS, 0, NULL);=0D }=0D =0D - return gRT->SetVariable (VariableName, &gEfiRedfishClientVariableGuid, V= ARIABLE_ATTRIBUTE_NV_BS, VarSize, (VOID *)VarData);=0D + Status =3D gRT->SetVariable (VariableName, &gEfiRedfishClientVariableGui= d, VARIABLE_ATTRIBUTE_NV_BS, VarSize, (VOID *)VarData);=0D +=0D + FreePool (VarData);=0D +=0D + return Status;=0D }=0D =0D /**=0D --=20 2.32.0 (Apple Git-132) -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#108047): https://edk2.groups.io/g/devel/message/108047 Mute This Topic: https://groups.io/mt/100988474/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-