This fixes the memory leak introduced by 3536f49e, which forgot to free the prefixes in the manager. Fixes #6398.