diff options
-rw-r--r-- | slicer/tool/parser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/slicer/tool/parser.cpp b/slicer/tool/parser.cpp index 633b16f..7759ebc 100644 --- a/slicer/tool/parser.cpp +++ b/slicer/tool/parser.cpp @@ -726,10 +726,12 @@ namespace Slicer { int parseStatus = u->parse(slicePath, cppHandle, false); if (!icecpp->close()) { + u->destroy(); throw CompilerError("preprocess close failed"); } if (parseStatus == EXIT_FAILURE) { + u->destroy(); throw CompilerError("unit parse failed"); } |