git: 56ec98a04d19 - main - pam_xdg: Close the dir after removal

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Fri, 01 Mar 2024 13:57:30 UTC
The branch main has been updated by manu:

URL: https://cgit.FreeBSD.org/src/commit/?id=56ec98a04d19fec3750e47d12eb581c139c8b405

commit 56ec98a04d19fec3750e47d12eb581c139c8b405
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2024-03-01 13:49:16 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2024-03-01 13:56:12 +0000

    pam_xdg: Close the dir after removal
    
    CID:    1534878
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
---
 lib/libpam/modules/pam_xdg/pam_xdg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/libpam/modules/pam_xdg/pam_xdg.c b/lib/libpam/modules/pam_xdg/pam_xdg.c
index f1a9b13d581c..4d586a21566a 100644
--- a/lib/libpam/modules/pam_xdg/pam_xdg.c
+++ b/lib/libpam/modules/pam_xdg/pam_xdg.c
@@ -199,6 +199,7 @@ remove_dir(int fd)
 		}
 		unlinkat(fd, dp->d_name, 0);
 	}
+	closedir(dirp);
 
 	return (0);
 }