[0.4.9][NTGDI] 'otm' is always non-NULL in epilogue CORE-16993

is a small optimization picked from 0.4.14-dev-108-g 1bf982ff88
otm is checked for NULL already a few lines before in that function, and is not touched
anymore in between the two locations. Tiny bit shorter+smaller now,
and might satisfy also some static code-analysis.
The origin of checking it twice for NULL dates back into the pre-0.4.7-era of ros.
This commit is contained in:
Joachim Henze 2022-10-10 02:34:14 +02:00
parent 4c35cd179c
commit cc27dfd4bc

View file

@ -908,8 +908,7 @@ NtGdiGetOutlineTextMetricsInternalW (HDC hDC,
return 0;
}
IntGetOutlineTextMetrics(FontGDI, Size, potm);
if (otm)
{
_SEH2_TRY
{
ProbeForWrite(otm, Size, 1);
@ -926,7 +925,7 @@ NtGdiGetOutlineTextMetricsInternalW (HDC hDC,
EngSetLastError(ERROR_INVALID_PARAMETER);
Size = 0;
}
}
ExFreePoolWithTag(potm,GDITAG_TEXT);
return Size;
}