mirror of https://github.com/acidanthera/audk.git
ShellPkg: Fix a potential NULL pointer deference issue
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
This commit is contained in:
parent
cb9f3a59c3
commit
51686a7a29
|
@ -3699,8 +3699,10 @@ CreatePopulateInstallShellProtocol (
|
|||
);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
OldProtocolNode = AllocateZeroPool(sizeof(SHELL_PROTOCOL_HANDLE_LIST));
|
||||
if (OldProtocolNode == NULL && !IsListEmpty (&ShellInfoObject.OldShellList.Link)) {
|
||||
CleanUpShellProtocol (&mShellProtocol);
|
||||
if (OldProtocolNode == NULL) {
|
||||
if (!IsListEmpty (&ShellInfoObject.OldShellList.Link)) {
|
||||
CleanUpShellProtocol (&mShellProtocol);
|
||||
}
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue