lua: close directory after reading its entries

Fixes #4045.
This commit is contained in:
William Woodruff 2017-01-16 16:31:23 -05:00 committed by wm4
parent 9850932722
commit a4cdd8bb82
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}