A polymer and a method for its preparation are provided. The polymer comprises poly(lactide), poly(lactide/glycolide) or poly(lactic acid/glycolic acid) segments bonded by ester linkages to both ends of an alkanediol core unit. The polymer is for use in a controlled release formulation for a medicament, preferably leuprolide acetate. The controlled release formulation is administered to a patient as a subcutaneous depot of a flowable composition comprising the polymer, a biocompatible solvent, and the medicament. Controlled release formulations comprising the polymer release leuprolide for treatment of prostate cancer patients over periods of 3-6 months.