Thread (1 message) 1 message, 1 author, 2016-06-15
DORMANTno replies

[PATCH] builtin-clone.c: Need to closedir() in copy_or_link_directory()

From: <hidden>
Date: 2016-06-15 22:44:37
Subsystem: the rest · Maintainer: Linus Torvalds

From: Brandon Casey <redacted>

So not to leak file descriptors, close the directory after opening it.

Signed-off-by: Brandon Casey <redacted>
---
 builtin-clone.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/builtin-clone.c b/builtin-clone.c
index 8713128..8936a51 100644
--- a/builtin-clone.c
+++ b/builtin-clone.c
@@ -215,6 +215,7 @@ static void copy_or_link_directory(char *src, char *dest)
 				die("failed to create link %s\n", dest);
 		}
 	}
+	closedir(dir);
 }
 
 static const struct ref *clone_local(const char *src_repo,
-- 
1.5.5.1.447.geb0a7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help