diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 30c180ef5..4665c684a 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -3220,6 +3220,14 @@ int Monitor::Close() { analysis_thread->Stop(); } packetqueue.clear(); + if (audio_fifo) { + delete audio_fifo; + audio_fifo = nullptr; + } + if (video_fifo) { + delete video_fifo; + video_fifo = nullptr; + } std::lock_guard lck(event_mutex); if (event) {