From 71d5984eb017943395a1f285ecb26cd10e67280d Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 12 Apr 2018 10:26:18 -0400 Subject: [PATCH] delete stream after use --- src/zm_monitor.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 5c0064a1e..3b602412b 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1096,6 +1096,8 @@ void Monitor::DumpZoneImage( const char *zone_string ) { EventStream *stream = new EventStream(); stream->setStreamStart( event_id, (unsigned int)1 ); zone_image = stream->getImage(); + delete stream; + stream = NULL; } else { Error("Unable to load an event for monitor %d", id ); return;