util: Free memory in charset torture test to satisfy sanitizer