test: Fix some memory leaks in test-font.c (#409)

Coverity IDs: 141039, 141040, 141041
1 file changed