proper fix to memleak

This commit is contained in:
Isaac Connor 2021-11-11 14:42:08 -05:00
parent 6d30f5431b
commit 036d47a832
1 changed files with 2 additions and 2 deletions

View File

@ -141,7 +141,6 @@ Event::Event(
if (monitor->ServerId())
sql += stringtf(" AND ServerId=%u", monitor->ServerId());
delete storage;
storage = nullptr;
MYSQL_RES *result = zmDbFetch(sql);
@ -218,7 +217,8 @@ Event::Event(
Debug(1, "Video file is %s", video_file.c_str());
}
} // end if GetOptVideoWriter
delete storage;
if (storage != monitor->getStorage())
delete storage;
}
Event::~Event() {