mirror of
https://github.com/reactos/reactos.git
synced 2024-11-10 00:34:39 +00:00
[NTGDI] FontLink: avoid invalid font name buffer freeing (#7131)
Don't free the linked font name if it's already NULL. Since it is allocated only once (when loading the font name from Registry), it should be freed only once too. All subsequent freeing attempts will result in invalid pool freeing.
This fixes the 0xC2 BAD_POOL_CALLER bugcheck when trying to resize window (and draw more text) from soundcloud.com in K-Meleon 76.5.4 Goanna engine and when switching between channels (during redrawing the text) in DiscordMessenger v1.06 Beta.
Addendum to 0f9e889736
.
CORE-19681
This commit is contained in:
parent
9e07d0cc74
commit
04f04efc96
1 changed files with 2 additions and 1 deletions
|
@ -220,7 +220,8 @@ FontLink_Chain_Free(
|
|||
if (!FontLink_Chain_IsPopulated(pChain)) // The chain is not populated yet
|
||||
return;
|
||||
|
||||
ExFreePoolWithTag(pChain->pszzFontLink, TAG_FONT);
|
||||
if (pChain->pszzFontLink)
|
||||
ExFreePoolWithTag(pChain->pszzFontLink, TAG_FONT);
|
||||
|
||||
while (!IsListEmpty(&pChain->FontLinkList))
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue