mirror of https://github.com/acidanthera/audk.git
Fix a bug introduced when removing the SafeFreePool. Pointer should be checked before FreePool.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6349 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
f7763aa493
commit
c473cc1756
|
@ -305,7 +305,9 @@ BdsLibRegisterNewOption (
|
|||
// Got the option, so just return
|
||||
//
|
||||
FreePool (OptionPtr);
|
||||
if (TempOptionPtr != NULL) {
|
||||
FreePool (TempOptionPtr);
|
||||
}
|
||||
return EFI_SUCCESS;
|
||||
} else {
|
||||
//
|
||||
|
@ -364,7 +366,9 @@ BdsLibRegisterNewOption (
|
|||
//
|
||||
if (EFI_ERROR (Status) || UpdateDescription) {
|
||||
FreePool (OptionPtr);
|
||||
if (TempOptionPtr != NULL) {
|
||||
FreePool (TempOptionPtr);
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
@ -386,7 +390,9 @@ BdsLibRegisterNewOption (
|
|||
sizeof (UINT16),
|
||||
&BootOrderEntry
|
||||
);
|
||||
if (TempOptionPtr != NULL) {
|
||||
FreePool (TempOptionPtr);
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue