diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-12-14 01:47:07 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2020-12-14 01:47:07 +0000 |
commit | 2a37926cdaf58a59c4c607a9043c018ca699307d (patch) | |
tree | b896f330e3f21a780ba28f15b991ad734c74a574 | |
parent | Refactor metadata (diff) | |
download | slicer-2a37926cdaf58a59c4c607a9043c018ca699307d.tar.bz2 slicer-2a37926cdaf58a59c4c607a9043c018ca699307d.tar.xz slicer-2a37926cdaf58a59c4c607a9043c018ca699307d.zip |
Add missing calls to unit destroy on error
-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"); } |