Fixed a crash which could cause a double free call

This commit is contained in:
WolverinDEV 2021-04-23 11:11:41 +02:00
parent 05f834b47d
commit 356687b0be
1 changed files with 1 additions and 0 deletions

View File

@ -172,6 +172,7 @@ void WhisperHandler::handle_session_reset() {
this->session_state = SessionState::Uninitialized;
if(this->whisper_head_ptr) {
::free(this->whisper_head_ptr);
this->whisper_head_ptr = nullptr;
this->whisper_head_capacity = 0;
this->whisper_head_length = 0;
}