From 3c22365b80ae413b8614b7c904c37aac288fe7f2 Mon Sep 17 00:00:00 2001 From: Alexey Kopytov Date: Thu, 9 Jun 2016 19:55:22 +0300 Subject: [PATCH] Fix crash introduced by commit 9244fcf. There was a regression introduced by commit regression resulting a double release of mutex in script_lua.c. --- sysbench/scripting/script_lua.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sysbench/scripting/script_lua.c b/sysbench/scripting/script_lua.c index a103721..f14c33e 100644 --- a/sysbench/scripting/script_lua.c +++ b/sysbench/scripting/script_lua.c @@ -250,13 +250,12 @@ sb_request_t sb_lua_get_request(int thread_id) SB_THREAD_MUTEX_UNLOCK(); return req; } + nevents++; SB_THREAD_MUTEX_UNLOCK(); } req.type = SB_REQ_TYPE_SCRIPT; - nevents++; - SB_THREAD_MUTEX_UNLOCK(); - + return req; }