Linux XFS filesystem development
 help / color / mirror / Atom feed
* [PATCH v1] proto: fix file descriptor leak
@ 2025-10-24 19:36 Luca Di Maio
  2025-10-24 19:45 ` Luca Di Maio
  2025-10-24 21:35 ` Darrick J. Wong
  0 siblings, 2 replies; 4+ messages in thread
From: Luca Di Maio @ 2025-10-24 19:36 UTC (permalink / raw)
  To: linux-xfs; +Cc: Luca Di Maio, dimitri.ledkov, smoser, djwong, hch

fix leak of pathfd introduced in commit 8a4ea72724930cfe262ccda03028264e1a81b145

Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
---
 mkfs/proto.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mkfs/proto.c b/mkfs/proto.c
index 2b29240d..1a7b3586 100644
--- a/mkfs/proto.c
+++ b/mkfs/proto.c
@@ -1772,6 +1772,7 @@ handle_direntry(
 	create_nondir_inode(mp, pip, fsxp, mode, creds, xname, flags, file_stat,
 			    rdev, fd, fname);
 out:
+	close(pathfd);
 	/* Reset path_buf to original */
 	path_buf[path_len] = '\0';
 }
--
2.51.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-25  7:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-24 19:36 [PATCH v1] proto: fix file descriptor leak Luca Di Maio
2025-10-24 19:45 ` Luca Di Maio
2025-10-24 21:35 ` Darrick J. Wong
2025-10-25  7:19   ` Luca Di Maio

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox