From 67f98e8ac9175ba0ce7abd8c2e10f3d0253f3baa Mon Sep 17 00:00:00 2001 From: CJ Cobb Date: Fri, 26 Mar 2021 12:55:07 -0400 Subject: [PATCH] fix memory leak --- reporting/CassandraBackend.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reporting/CassandraBackend.h b/reporting/CassandraBackend.h index c50b2712..fc062021 100644 --- a/reporting/CassandraBackend.h +++ b/reporting/CassandraBackend.h @@ -282,14 +282,14 @@ public: BOOST_LOG_TRIVIAL(error) << __func__ << " : " << ss.str(); throw std::runtime_error(ss.str()); } + cass_tuple_free(tuple); curBindingIndex_++; } - CassandraStatement() + ~CassandraStatement() { if (statement_) cass_statement_free(statement_); - BOOST_LOG_TRIVIAL(info) << __func__; } }; @@ -461,6 +461,8 @@ public: { if (result_ != nullptr) cass_result_free(result_); + if (iter_ != nullptr) + cass_iterator_free(iter_); } }; inline bool