From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by mx.groups.io with SMTP id smtpd.web12.8379.1660599838165467800 for ; Mon, 15 Aug 2022 14:43:58 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20210112 header.b=LKdkR3uS; spf=pass (domain: gmail.com, ip: 209.85.167.54, mailfrom: mike.maslenkin@gmail.com) Received: by mail-lf1-f54.google.com with SMTP id u1so12333540lfq.4 for ; Mon, 15 Aug 2022 14:43:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc; bh=7dzNwQOs4NTZWM0QWutXABrmO39Nwsa7c+GXWIY9KSk=; b=LKdkR3uSTnQo7BVnJLOnbO/6qBhCLd7tZZlHR9q/h3BBCq1J2GT0XxYex0qIvCBf1I ZCOdE8kS/gBnFC6XRABNeB6urxzk5O2jJM6WoEiL0zAwl183Te02aWVkYMypHPGmqMkp OdNvZvp9l9+3LYTF7gkgLpRPYQclIdy87FFPnuTDko+oJp0gbPr+X5FiYRqwfWUxMRPJ TobkkC3GBpdk56uD0pbHlnsrJxA7Abv+GAvvoSwZ66Tg/S0fhCIkwYKcQe10A/x+NCFG 1MDlejibgn8lJb6vCcHO+1t+022hKNa3aHuASZrrXoVugqDECq90hynju2woeoRbx9ZL voNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc; bh=7dzNwQOs4NTZWM0QWutXABrmO39Nwsa7c+GXWIY9KSk=; b=d+0dOvQLlbBdMUEMF3ovl1TRcC0ZAF7aUviPCRJ/+0s1votYBg7c+4Nt9e5KaoSSzA yp8lmbXpYa7TyWfeFczv7BFpPsQt95fHK2Bt0HV0Us78laj79lbCSxLJGjqCc3kh8fSU 6pxZv/wBDttF1P+CEWUjoiyoSB94y53ZHAHFo3N6TqbNBw6oLF8c9OsIQd7C5bLuBaHQ I2ObNOpMq8kT60UOjXqZ60Gh0PKcE1lIJBCQ8Z50hM8bsXZ7cGrrDBawLceImkzADxCg mvPae+7vPFLYK/DWqzrEuMD8H7Qcv+FljCRywf6YENBMMVQqu41ZsXDAhROZqQKlXHmQ ADmw== X-Gm-Message-State: ACgBeo0/07dEZi70dTvFL7p1bnvwmnsc63/BcC9A4nNtgaNghQqs13RR mmzylOkWqsnBLYNv8xV2tMSkLIkKY5A= X-Google-Smtp-Source: AA6agR7iXeOvNSF05zcnmKMFYUZMfvqTcctRWBe2XUpfZRz6yAkuUwIF2AH8VQsuUEzgLV5Ymuketg== X-Received: by 2002:a05:6512:239f:b0:491:cd95:f67d with SMTP id c31-20020a056512239f00b00491cd95f67dmr3476978lfv.184.1660599836337; Mon, 15 Aug 2022 14:43:56 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([79.164.221.98]) by smtp.gmail.com with ESMTPSA id s2-20020a056512202200b0048a82fec50esm1195266lfs.305.2022.08.15.14.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Aug 2022 14:43:56 -0700 (PDT) From: "Mike Maslenkin" To: devel@edk2.groups.io Cc: Mike Maslenkin , Liming Gao , Dandan Bi Subject: [PATCH 1/2] MdeModulePkg/Core/Dxe: Fix memory leak issue in FwVol.c Date: Mon, 15 Aug 2022 21:41:37 +0000 Message-Id: <20220815214138.15318-2-mike.maslenkin@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220815214138.15318-1-mike.maslenkin@gmail.com> References: <20220815214138.15318-1-mike.maslenkin@gmail.com> FwVolHeader must be deallocated on error path. Cc: Liming Gao Cc: Dandan Bi Signed-off-by: Mike Maslenkin --- 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.17.1