git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] sha1_file.c;prepare_packed_git_one() - fix DIR leak

From
Junio C Hamano <junkio@cox.net>
Date
Jul 6, 2005, 06:52 UTC
Message-ID
<7voe9gxw7y.fsf@assigned-by-dhcp.cox.net>
The function calls opendir() without a matching closedir().
Signed-off-by: Junio C Hamano <junkio@cox.net>
---
 sha1_file.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
7a47797264a0be7955f3422a6e79e3311ab2775f
diff --git a/sha1_file.c b/sha1_file.c
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -463,6 +463,7 @@ static void prepare_packed_git_one(char 
 		p->next = packed_git;
 		packed_git = p;
 	}
+	closedir(dir);
 }
 
 void prepare_packed_git(void)
Next: Junio C Hamano
Message 1 of 2 in “sha1_file.c;prepare_packed_git_one() - fix DIR leak”
  1. sha1_file.c;prepare_packed_git_one() - fix DIR leakJunio C Hamano, Jul 6, 2005
  2. clone-pack.c:write_one_ref() - Create leading directories.Junio C Hamano, Jul 6, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.