crypto: fix memory leak in CipherBase::Final

fix #7497