* src/ftmulti.c: Fix crash when exiting due to `FT_Get_MM_Var` and `free` mismatch.
Behaviour
Crash when exiting on:
- Windows 10 22H2
- Visual Studio 2022 17.6.1
- Windows SDK 10
- freetype2 and freetype-demos git HEAD
- Meson, Debug build
In Windows debug build, the crash is accompanied with a popup dialog complaining "Heap corrupted", and when started with a debugger, a breakpoint is triggered in free
func invocation.
Fix
Simply change the free
func call to FT_Done_MM_Var
which calls HeapFree
(matches with HeapAlloc
, instead of malloc
).