From 490c0c3b574329d60ab497c818f3702601ada8af Mon Sep 17 00:00:00 2001 From: batrick Date: Tue, 14 Jul 2009 11:36:39 +0000 Subject: [PATCH] Add destructor for mutex "trylock" case (was forgotten in mutex destructor patch). --- nse_nmaplib.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nse_nmaplib.cc b/nse_nmaplib.cc index a277ab0b1..55d44cd70 100644 --- a/nse_nmaplib.cc +++ b/nse_nmaplib.cc @@ -275,6 +275,9 @@ static int aux_mutex (lua_State *L) { lua_pushthread(L); lua_replace(L, lua_upvalueindex(2)); + lua_pushvalue(L, lua_upvalueindex(3)); // unique identifier + lua_pushvalue(L, lua_upvalueindex(4)); // aux_mutex_done closure + nse_destructor(L, 'a'); lua_pushboolean(L, true); } else