From a4cdd8bb823dbb8f981a4b5efcfcb0f9d118844e Mon Sep 17 00:00:00 2001 From: William Woodruff Date: Mon, 16 Jan 2017 16:31:23 -0500 Subject: [PATCH] lua: close directory after reading its entries Fixes #4045. --- player/lua.c | 1 + 1 file changed, 1 insertion(+) diff --git a/player/lua.c b/player/lua.c index ce9387bdae..62f42baea1 100644 --- a/player/lua.c +++ b/player/lua.c @@ -1079,6 +1079,7 @@ static int script_readdir(lua_State *L) lua_pushstring(L, name); // list index name lua_settable(L, -3); // list } + closedir(dir); talloc_free(fullpath); return 1; }