From 0b49102df9dc762d7c2531f06f99a4f31e6e0d43 Mon Sep 17 00:00:00 2001 From: Mikhail Galanin Date: Mon, 10 Sep 2018 10:37:59 +0100 Subject: [PATCH] [Test] Mark "connection" resource as freed mt.disconnect() performs free(). If we call it twice with the same argument, we will get double free() --- test/functional/lua/miltertest/lib.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- 2.39.5