Freed N.Y. inmate has heart attack