Free allocated memory before luaL_error() in screen_input()