Clear m_sws_ctx when freeing it.

Oops.  May help #5781.