diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2019-06-24 03:23:15 -0700 |
---|---|---|
committer | Aina Niemetz <aina.niemetz@gmail.com> | 2019-06-24 03:23:15 -0700 |
commit | 5d6664a43c8ea3400b0f38797c937568d8d0ca2a (patch) | |
tree | 8f887e41a643ccb6e2ece90e52333f4cac1d7e53 /test/unit/parser | |
parent | 252a8fb4323fed6eb621a4f88a06abfc39307b76 (diff) |
Fix memory leak in unit test (#3068)
PR #3062 changed `Smt2::setLogic()` to return a heap-allocated command,
which didn't get cleaned up by our `parser_black` unit test. This commit
fixes the memory leak.
Diffstat (limited to 'test/unit/parser')
-rw-r--r-- | test/unit/parser/parser_black.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/unit/parser/parser_black.h b/test/unit/parser/parser_black.h index f2f5f24b6..13beedd63 100644 --- a/test/unit/parser/parser_black.h +++ b/test/unit/parser/parser_black.h @@ -141,7 +141,8 @@ class ParserBlack if (d_lang == LANG_SMTLIB_V2) { // Use QF_LIA to make multiplication ("*") available - static_cast<Smt2*>(parser)->setLogic("QF_LIA"); + std::unique_ptr<Command> cmd( + static_cast<Smt2*>(parser)->setLogic("QF_LIA")); } TS_ASSERT(!parser->done()); |