public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Mike Maslenkin" <mike.maslenkin@gmail.com>
To: devel@edk2.groups.io
Cc: dandan.bi@intel.com, gaoliming@byosoft.com.cn,
	michael.d.kinney@intel.com, nathaniel.l.desimone@intel.com,
	Mike Maslenkin <mike.maslenkin@gmail.com>
Subject: [edk2-devel] [PATCH 1/2] MdeModulePkg/Core/Dxe: Fix memory leak issue in FwVol.c
Date: Fri,  1 Sep 2023 03:10:31 +0300	[thread overview]
Message-ID: <20230901001032.52136-2-mike.maslenkin@gmail.com> (raw)
In-Reply-To: <20230901001032.52136-1-mike.maslenkin@gmail.com>

FwVolHeader must be deallocated on error path.

Signed-off-by: Mike Maslenkin <mike.maslenkin@gmail.com>
---
 MdeModulePkg/Core/Dxe/FwVol/FwVol.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c
index 153bfecafa77..0c1554ba4d63 100644
--- a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c
+++ b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c
@@ -659,6 +659,7 @@ NotifyFwVolBlock (
       //
       FvDevice = AllocateCopyPool (sizeof (FV_DEVICE), &mFvDevice);
       if (FvDevice == NULL) {
+        CoreFreePool (FwVolHeader);
         return;
       }
 
-- 
2.32.0 (Apple Git-132)



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#108221): https://edk2.groups.io/g/devel/message/108221
Mute This Topic: https://groups.io/mt/101085563/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



  reply	other threads:[~2023-09-01  0:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-01  0:10 [edk2-devel] [PATCH 0/2] MdeModulePkg/Core/Dxe: Fix memory leak issues Mike Maslenkin
2023-09-01  0:10 ` Mike Maslenkin [this message]
2023-09-08 21:46   ` [edk2-devel] [PATCH 1/2] MdeModulePkg/Core/Dxe: Fix memory leak issue in FwVol.c Michael D Kinney
2023-09-01  0:10 ` [edk2-devel] [PATCH 2/2] MdeModulePkg/Core/Dxe: Fix memory leak issue in FwVolBlock.c Mike Maslenkin
2023-09-08 21:46   ` Michael D Kinney
2023-09-08 21:40 ` [edk2-devel] [PATCH 0/2] MdeModulePkg/Core/Dxe: Fix memory leak issues Michael D Kinney
2023-09-08 21:49   ` Michael D Kinney
2023-09-11  0:55     ` 回复: " gaoliming via groups.io
2023-09-11  2:30       ` Michael D Kinney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230901001032.52136-2-mike.maslenkin@gmail.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox