about summary refs log tree commit diff homepage
path: root/unittests/Solver/Z3SolverTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'unittests/Solver/Z3SolverTest.cpp')
-rw-r--r--unittests/Solver/Z3SolverTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/unittests/Solver/Z3SolverTest.cpp b/unittests/Solver/Z3SolverTest.cpp
index 0eba3d0e..9f4a4786 100644
--- a/unittests/Solver/Z3SolverTest.cpp
+++ b/unittests/Solver/Z3SolverTest.cpp
@@ -63,9 +63,9 @@ TEST_F(Z3SolverTest, GetConstraintLog) {
 
   // Ensure this is not buggy as fixed in https://github.com/klee/klee/pull/1235
   // If the bug is still present this fail due to an internal assertion
-  char *ConstraintsString = Z3Solver_->getConstraintLog(TheQuery);
+  std::string ConstraintsString = Z3Solver_->getConstraintLog(TheQuery);
   const char *ExpectedArraySelection = "(= (select const_array_0";
-  const char *Occurence = std::strstr(ConstraintsString, ExpectedArraySelection);
+  const char *Occurence =
+      std::strstr(ConstraintsString.c_str(), ExpectedArraySelection);
   ASSERT_STRNE(Occurence, nullptr);
-  free(ConstraintsString);
 }