diff options
author | Mikhail Galanin <mgalanin@mimecast.com> | 2018-09-10 10:37:59 +0100 |
---|---|---|
committer | Mikhail Galanin <mgalanin@mimecast.com> | 2018-09-10 10:37:59 +0100 |
commit | 0b49102df9dc762d7c2531f06f99a4f31e6e0d43 (patch) | |
tree | 8c80f2aa68af7ec4d4b302cf2dff1e179a88bdcd | |
parent | 65b03cd7e7c56b490895cd0f41687863beadea3e (diff) | |
download | rspamd-0b49102df9dc762d7c2531f06f99a4f31e6e0d43.tar.gz rspamd-0b49102df9dc762d7c2531f06f99a4f31e6e0d43.zip |
[Test] Mark "connection" resource as freed
mt.disconnect() performs free(). If we call it twice with the same argument, we will get double free()
-rw-r--r-- | test/functional/lua/miltertest/lib.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/functional/lua/miltertest/lib.lua b/test/functional/lua/miltertest/lib.lua index f7dc3cc79..e94efd559 100644 --- a/test/functional/lua/miltertest/lib.lua +++ b/test/functional/lua/miltertest/lib.lua @@ -21,7 +21,10 @@ function setup(c_ip, helo, hn) end function teardown() - mt.disconnect(conn) + if conn then + mt.disconnect(conn) + end + conn = nil end function send_message(body, hdrs, id, sender, rcpts) |