According to legend, Santa Anna gave fellow Mason Sam Houston the Masonic handshake indicating distress. Since part of Masonic code is to forgive a fellow Mason in distress, Houston let Santa Anna go.
BTW: Santa Anna is the second most hated man in Mexican history, after General Huerta.