mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-24 16:27:42 +01:00
Fix hang before Clover GUI caused by the use of freepool to free alligned pages
This commit is contained in:
parent
14cdfe29c7
commit
18a38138e4
@ -177,9 +177,10 @@ StartupSoundPlay(EFI_FILE *Dir, CONST CHAR16* SoundFile)
|
|||||||
Tmp = Next;
|
Tmp = Next;
|
||||||
}
|
}
|
||||||
freq = EfiAudioIoFreq48kHz;
|
freq = EfiAudioIoFreq48kHz;
|
||||||
|
// Samples was allocated via AllocateAlignedPages, so it must not be freed with FreePool, but according to the number of pages allocated
|
||||||
|
FreePages(WaveData.Samples,EFI_SIZE_TO_PAGES(WaveData.SamplesLength+4095));
|
||||||
WaveData.SamplesLength *= 6;
|
WaveData.SamplesLength *= 6;
|
||||||
DBG("sound converted to 48kHz\n");
|
DBG("sound converted to 48kHz\n");
|
||||||
FreePool(WaveData.Samples);
|
|
||||||
WaveData.Samples = (UINT8*)TempData;
|
WaveData.Samples = (UINT8*)TempData;
|
||||||
} else {
|
} else {
|
||||||
TempData = (UINT16*)WaveData.Samples;
|
TempData = (UINT16*)WaveData.Samples;
|
||||||
|
Loading…
Reference in New Issue
Block a user