From: Mikhail Galanin Date: Mon, 10 Sep 2018 09:37:59 +0000 (+0100) Subject: [Test] Mark "connection" resource as freed X-Git-Tag: 1.8.0~153^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b49102df9dc762d7c2531f06f99a4f31e6e0d43;p=thirdparty%2Frspamd.git [Test] Mark "connection" resource as freed mt.disconnect() performs free(). If we call it twice with the same argument, we will get double free() --- diff --git a/test/functional/lua/miltertest/lib.lua b/test/functional/lua/miltertest/lib.lua index f7dc3cc79c..e94efd559d 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)