Skip to content

Commit

Permalink
Merge pull request #12 from scylla-zpp-blas/fix-future-destructor
Browse files Browse the repository at this point in the history
Fixed bug in destructing moved-from futures
  • Loading branch information
Lorak-mmk authored Jun 3, 2021
2 parents 9380322 + 596a0d2 commit a9ea3ca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/future.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@ scmd::future &scmd::future::operator=(scmd::future &&other) noexcept {
}

scmd::future::~future() {
cass_future_free(this->_future);
delete cb;
if(this->_future) {
cass_future_free(this->_future);
}
if (cb) {
delete cb;
}
}

bool scmd::future::is_ready() {
Expand Down

0 comments on commit a9ea3ca

Please sign in to comment.