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
This commit is contained in:
ydong10 2012-05-07 08:51:42 +00:00
parent 834d3ccda0
commit 7c9fbd79d1
3 changed files with 6 additions and 1 deletions

View File

@ -739,9 +739,11 @@ BdsLibVariableToOption (
} }
FreePool (Variable); FreePool (Variable);
FreePool (Option->Description);
FreePool (Option->DevicePath);
FreePool (Option->LoadOptions);
FreePool (Option); FreePool (Option);
return NULL; return NULL;
} }
/** /**

View File

@ -758,6 +758,7 @@ CheckModeSupported (
// //
// If video device has been set to this mode, we do not need to SetMode again // If video device has been set to this mode, we do not need to SetMode again
// //
FreePool (Info);
break; break;
} else { } else {
Status = GraphicsOutput->SetMode (GraphicsOutput, ModeNumber); Status = GraphicsOutput->SetMode (GraphicsOutput, ModeNumber);

View File

@ -2028,6 +2028,8 @@ HiiCompareLanguage (
// //
// Return FALSE if any characters are different. // Return FALSE if any characters are different.
// //
FreePool (Lan1);
FreePool (Lan2);
return FALSE; return FALSE;
} }
} }