mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-23 05:34:31 +02:00
ArmPlatformPkg: fix two instances of FreePool () on NULL value
This is a copy/paste of the exact same code in both cases: Buffer should only be freed on the success path, otherwise it will be NULL Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Ronald Cron <Ronald.Cron@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17078 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
55f5af1871
commit
3a2b37f0d4
@ -155,8 +155,8 @@ InitializeConsolePipe (
|
|||||||
*Handle = Buffer[0];
|
*Handle = Buffer[0];
|
||||||
Status = gBS->HandleProtocol (*Handle, Protocol, Interface);
|
Status = gBS->HandleProtocol (*Handle, Protocol, Interface);
|
||||||
ASSERT_EFI_ERROR(Status);
|
ASSERT_EFI_ERROR(Status);
|
||||||
|
FreePool (Buffer);
|
||||||
}
|
}
|
||||||
FreePool (Buffer);
|
|
||||||
} else {
|
} else {
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -179,8 +179,8 @@ InitializeConsolePipe (
|
|||||||
*Handle = Buffer[0];
|
*Handle = Buffer[0];
|
||||||
Status = gBS->HandleProtocol (*Handle, Protocol, Interface);
|
Status = gBS->HandleProtocol (*Handle, Protocol, Interface);
|
||||||
ASSERT_EFI_ERROR (Status);
|
ASSERT_EFI_ERROR (Status);
|
||||||
|
FreePool (Buffer);
|
||||||
}
|
}
|
||||||
FreePool (Buffer);
|
|
||||||
} else {
|
} else {
|
||||||
Status = EFI_SUCCESS;
|
Status = EFI_SUCCESS;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user