summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2012-05-07 08:51:42 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2012-05-07 08:51:42 +0000
commit7c9fbd79d1fc8b817acb72c61cc19605d2f24907 (patch)
treef1bd314d0d806b5661edef8cd6296804316ebcb5
parent834d3ccda0e471559b469e0dffc93fc7e891b06f (diff)
downloadedk2-7c9fbd79d1fc8b817acb72c61cc19605d2f24907.tar.gz
edk2-7c9fbd79d1fc8b817acb72c61cc19605d2f24907.tar.bz2
edk2-7c9fbd79d1fc8b817acb72c61cc19605d2f24907.zip
Fix memory leak issues.
Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Li Elvin <elvin.li@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13288 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c4
-rw-r--r--MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c1
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/String.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c
index 9993e4b19d..ada77d26de 100644
--- a/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c
+++ b/IntelFrameworkModulePkg/Library/GenericBdsLib/BdsMisc.c
@@ -739,9 +739,11 @@ BdsLibVariableToOption (
}
FreePool (Variable);
+ FreePool (Option->Description);
+ FreePool (Option->DevicePath);
+ FreePool (Option->LoadOptions);
FreePool (Option);
return NULL;
-
}
/**
diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
index 2419b7c4a8..117569fa62 100644
--- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
+++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
@@ -758,6 +758,7 @@ CheckModeSupported (
//
// If video device has been set to this mode, we do not need to SetMode again
//
+ FreePool (Info);
break;
} else {
Status = GraphicsOutput->SetMode (GraphicsOutput, ModeNumber);
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/String.c b/MdeModulePkg/Universal/HiiDatabaseDxe/String.c
index 52d348c572..a76e5b64c9 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/String.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/String.c
@@ -2028,6 +2028,8 @@ HiiCompareLanguage (
//
// Return FALSE if any characters are different.
//
+ FreePool (Lan1);
+ FreePool (Lan2);
return FALSE;
}
}