Nip in the bud
Put a stop to something while in the early stage of its development dates from the late 16th century and derives from de-budding plants to prevent growth.