Make sure we free and cleanse the pms value in all code paths