Barry was promoted to Surgeon to the Forces on 22 November 1827. Barry's subsequent posting was to Mauritius in 1828. In 1829, Barry risked a great deal of trouble by going absent without leave to return to England and treat Somerset, who had fallen ill, and remained there until Somerset's death in 1831. Barry's subsequent posting was to Jamaica, and then the island of Saint Helena in 1836. At St Helena, one clash with a fellow army surgeon resulted in Barry being arrested and court-martialled on a charge of "conduct unbecoming of the character of an Officer and a Gentleman". Barry was found not guilty, and honourably acquitted.