[test_media_type] Fixed a memory leak