lua plugin: free mutex on callback destroy
[collectd.git] / 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);
 }