]> git.proxmox.com Git - mirror_edk2.git/commit
ShellPkg: Handle pool allocation failure
authorSergei Antonov <saproj@gmail.com>
Thu, 19 Sep 2013 17:23:10 +0000 (17:23 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 19 Sep 2013 17:23:10 +0000 (17:23 +0000)
commit6b6aa6d136067a3c9199b4413cdceb652a823b80
tree6f66f6cef0dd189bc6a29cfbefcaced62280c93b
parentc1d932429ef9700a2da64452546be14e92468b07
ShellPkg: Handle pool allocation failure

If AllocateZeroPool() returns NULL,
GetVariable() will return EFI_BUFFER_TOO_SMALL,
FreePool() will receive NULL.
So check for NULL before FreePool().

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Sergei Antonov <saproj@gmail.com>
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14688 6f19259b-4bc3-4df7-8a09-765794883524
ShellPkg/Library/UefiShellDebug1CommandsLib/SetVar.c