audk/MdeModulePkg
Star Zeng 4777032247 MdeModulePkg DxeCore: Only free ScratchBuffer when it is not NULL
There is a case that ExtractGuidedSectionGetInfo return 0 for
ScratchBufferSize and ScratchBuffer will be NULL, after AllocatePool
fails to allocate buffer for AllocatedOutputBuffer, the code will
call FreePool (ScratchBuffer), but ScratchBuffer == NULL.

This patch is to only free ScratchBuffer when it is not NULL.

Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
2017-06-26 13:17:16 +08:00
..
Application MdeModulePkg MemoryProfileInfo: Use PdbStringOffset to get PDB info 2017-05-24 15:27:35 +08:00
Bus MdeModulePkg: Clean ACPI 2.0 characters in UEFI spec 2017-06-20 09:29:43 +08:00
Core MdeModulePkg DxeCore: Only free ScratchBuffer when it is not NULL 2017-06-26 13:17:16 +08:00
Include MdeModulePkg SmiHandlerProfile: Use fixed data type in data structure 2017-05-24 15:27:34 +08:00
Library MdeModulePkg/BMMUiLib: Fix incorrect variable name 2017-06-13 10:45:37 +08:00
Logo MdeModulePkg/LogoDxe: Return error if HII Package not present 2017-05-22 16:30:11 -07:00
Universal MdeModulePkg Variable: Add missing change in dd59d95e19 2017-06-22 17:56:13 +08:00
Contributions.txt */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
License.txt Update copyright format 2012-04-24 06:49:39 +00:00
MdeModulePkg.dec MdeModulePkg/Include: Add IOMMU protocol definition. 2017-05-17 16:05:12 +08:00
MdeModulePkg.dsc MdeModulePkg: Update DEC/DSC version from 0.96 to 0.97 2017-05-05 15:55:09 +08:00
MdeModulePkg.uni MdeModulePkg: Add PROMPT&HELP string of pcd to UNI file 2017-03-07 21:47:19 +08:00
MdeModulePkgExtra.uni MdeModulePkg: Convert all .uni files to utf-8 2015-12-15 04:56:23 +00:00