Fix it maybe dose not release memory when it crash.

Signed-off-by: yushijinhun <yushijinhun@gmail.com>