If you follow sports related news, you know that tennis star Maria Sharapova recently tested positive for a banned performance enhancing drug called Meldonium. Details here and here and here.  According to one source, over 60 athletes have tested positive for Meldonium this year; the drug was just recently added the banned substances list. Sharapova claims she was unaware that she was taking a banned substance. 

A number of Sharapova's biggest sponsors have suspended or ended their relationship with her and/or delayed planned events. These sponsors include, Nike, Porsche, and TAG Heuer. Head and Evian appear to be sticking with her. Head chairman Johan Eliasch claimed that Sharapova simply made an "honest mistake."

The companies that have cut ties with Sharapova have likely been able to do so through what is often called a morals clause or a morality clause in the endorsement contract. Some background on morals clauses can be found here and here and here. And here is an interesting contract law question from Eric Goldman that involves morals clauses