From 7f693186a0c0ca9cc0d15ff3fd8fbc1734e95ee1 Mon Sep 17 00:00:00 2001 From: Nikolaj Bjorner Date: Tue, 10 Oct 2017 07:10:04 -0700 Subject: [PATCH] trying to address leak reported in #1297 Signed-off-by: Nikolaj Bjorner --- src/api/api_parsers.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/api/api_parsers.cpp b/src/api/api_parsers.cpp index bef31e9f1..7a68efbd8 100644 --- a/src/api/api_parsers.cpp +++ b/src/api/api_parsers.cpp @@ -69,6 +69,7 @@ extern "C" { ok = false; } mk_c(c)->m_smtlib_error_buffer = outs.str(); + outs.clear(); if (!ok) { mk_c(c)->reset_parser(); SET_ERROR_CODE(Z3_PARSER_ERROR); @@ -98,6 +99,7 @@ extern "C" { ok = false; } mk_c(c)->m_smtlib_error_buffer = outs.str(); + outs.clear(); if (!ok) { mk_c(c)->reset_parser(); SET_ERROR_CODE(Z3_PARSER_ERROR);