[fix] Memory leak when error (close #4)