If script successfully registered at least one callback,
destroying interpreter will cause Collectd crash when
that callback will be called.
Unfortunately, there is no way to unregister these callbacks
else
ERROR("Lua plugin: Executing script \"%s\" failed:\n%s",
script_path, errmsg);
-
- lua_script_free(script);
- return -1;
}
/* Append this script to the global list of scripts. */
scripts = script;
}
+ if (status != 0)
+ return -1;
+
return 0;
} /* }}} int lua_script_load */