Memory leak in `Load_Glyph`

Not sure this is the greatest place for a bug report.

A few year ago there seems to have been some work that better aligned some memory in Load_Glyph:

Though when the buffer is adjusted, that bit of memory is unable to be free-ed with Flush_Glyph_Image.

Below is the gcc Address Sanitizer report I have that supports this.

Indirect leak of 8190 byte(s) in 50 object(s) allocated from:
    #0 0xdbb2b in __interceptor_malloc /tmp/dgboter/bbs/rhev-vm8--rhe6x86_64/buildbot/rhe6x86_64--arm-linux-gnueabihf/build/src/gcc/libsanitizer/asan/
    #1 0xb6e15f3f in Load_Glyph (/mnt/SDCARD/miyoo/lib/
    #2 0xb6e169eb in Find_Glyph (/mnt/SDCARD/miyoo/lib/
    #3 0xb6e19077 in TTF_RenderUNICODE_Blended (/mnt/SDCARD/miyoo/lib/
    #4 0xb6e18e3f in TTF_RenderUTF8_Blended (/mnt/SDCARD/miyoo/lib/
    #5 0x14120f in main /root/workspace/src/themeSwitcher/themeSwitcher.c:353
    #6 0xb6a7e6bf in __libc_start_main (/lib/

Hi, thanks for reporting an issue.
did you try with latest SDL_ttf ?
just a thought, maybe you’re missing a TTF_CloseFont() or TTF_Quit() at the end of you program ?
Otherwise, can you provide a test-case! → GitHub - libsdl-org/SDL_ttf: Support for TrueType (.ttf) font files with Simple Directmedia Layer.