Add a PE memleak test, and fix a memleak.

This commit is contained in:
Vlad Grigorescu 2015-04-19 20:22:42 -04:00
parent d4bd5672c0
commit 93b84463f5
3 changed files with 13 additions and 0 deletions

View file

@ -14,6 +14,7 @@ PE::PE(RecordVal* args, File* file)
PE::~PE()
{
delete interp;
delete conn;
}
bool PE::DeliverStream(const u_char* data, uint64 len)

Binary file not shown.

View file

@ -0,0 +1,12 @@
# Needs perftools support.
#
# @TEST-GROUP: leaks
#
# @TEST-REQUIRES: bro --help 2>&1 | grep -q mem-leaks
#
# @TEST-EXEC: HEAP_CHECK_DUMP_DIRECTORY=. HEAPCHECK=local btest-bg-run bro bro -b -m -r $TRACES/pe/pe.trace %INPUT
# @TEST-EXEC: btest-bg-wait 60
@load base/protocols/ftp
@load base/files/pe