lua plugin: free mutex on callback destroy
authorPavel Rochnyack <pavel2000@ngs.ru>
Wed, 1 May 2019 12:32:14 +0000 (19:32 +0700)
committerPavel Rochnyack <pavel2000@ngs.ru>
Wed, 1 May 2019 12:32:14 +0000 (19:32 +0700)
src/lua.c

index 8dc78d0..d1c0085 100644 (file)
--- a/src/lua.c
+++ b/src/lua.c
@@ -261,6 +261,7 @@ static int lua_cb_dispatch_values(lua_State *L) /* {{{ */
 static void lua_cb_free(void *data) {
   clua_callback_data_t *cb = data;
   free(cb->lua_function_name);
+  pthread_mutex_destroy(&cb->lock);
   free(cb);
 }