proper fix to memleak
This commit is contained in:
parent
6d30f5431b
commit
036d47a832
|
@ -141,7 +141,6 @@ Event::Event(
|
||||||
if (monitor->ServerId())
|
if (monitor->ServerId())
|
||||||
sql += stringtf(" AND ServerId=%u", monitor->ServerId());
|
sql += stringtf(" AND ServerId=%u", monitor->ServerId());
|
||||||
|
|
||||||
delete storage;
|
|
||||||
storage = nullptr;
|
storage = nullptr;
|
||||||
|
|
||||||
MYSQL_RES *result = zmDbFetch(sql);
|
MYSQL_RES *result = zmDbFetch(sql);
|
||||||
|
@ -218,7 +217,8 @@ Event::Event(
|
||||||
Debug(1, "Video file is %s", video_file.c_str());
|
Debug(1, "Video file is %s", video_file.c_str());
|
||||||
}
|
}
|
||||||
} // end if GetOptVideoWriter
|
} // end if GetOptVideoWriter
|
||||||
delete storage;
|
if (storage != monitor->getStorage())
|
||||||
|
delete storage;
|
||||||
}
|
}
|
||||||
|
|
||||||
Event::~Event() {
|
Event::~Event() {
|
||||||
|
|
Loading…
Reference in New Issue