The following patch tries to fix a couple of issues in EqualFamilyInfo, however seems I am missing (or not understanding fully the objective of the API).
1) Remove pointer checks against NULL.
plog->elfStyle nor plog->elfStyle will ever be NULL since they are an address in memory already allocated.
2) Remove the check
if ((pLog1->elfStyle != NULL) != (pLog2->elfStyle != NULL)) as a whole.
The only reasonable approach would be:
if ((pLog1->elfStyle) != (pLog2->elfStyle))
However this checks if elfStyle address pointed from pLog1 is exactly the same address pointed by elfStyle in pLog2, which I don't think is the objective here. Iiuc the idea is to compare if both pLogX are having the same information but not the same pointers.
Freetype.c patch fixes this issue. Please review the expected logic.
On the other hand I don't get why RtlInitUnicodeString are needed at all. Seems much more effficient to use _wcsicmp which performs case-insensitive comparisons directly by using directly the pointer.
Freetype2.c patch uses this other approach.