Add missing FreeDir() in CheckTablespaceDirectory()

CheckTablespaceDirectory() did not close the directory opened with
AllocateDir(), leaving its resources held during subsequent recovery,
potentially indefinitely on a standby.  Add the missing FreeDir() call.

Backpatch to all supported versions.

Author: Chao Li <[email protected]>
Reviewed-by: Fujii Masao <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Backpatch-through: 14

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/cde0f9c6a2a54f965b2405ad06e857b2cbbe47de

Modified Files
--------------
src/backend/access/transam/xlog.c | 1 +
1 file changed, 1 insertion(+)

Reply via email to