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

[PATCH 1/3] prune-packed: fix minor memory leak

From
Jeff King <peff@peff.net>
Date
Sep 13, 2014, 20:16 UTC
Message-ID
<20140913201653.GA27082@peff.net>
In-Reply-To
<20140913201538.GA24854@peff.net>
We form all of our directories in a strbuf, but never release it.
Signed-off-by: Jeff King <peff@peff.net>
---
 builtin/prune-packed.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/builtin/prune-packed.c b/builtin/prune-packed.c
index 6879468..d430731 100644
--- a/builtin/prune-packed.c
+++ b/builtin/prune-packed.c
@@ -68,6 +68,7 @@ void prune_packed_objects(int opts)
 		rmdir(pathname.buf);
 	}
 	stop_progress(&progress);
+	strbuf_release(&pathname);
 }
 
 int cmd_prune_packed(int argc, const char **argv, const char *prefix)
-- 
2.1.0.373.g91ca799
Previous: Jeff KingNext: Jeff King
Message 4 of 9 in “repack: call prune_packed_objects() and update_server_info() directly”
  1. repack: call prune_packed_objects() and update_server_info() directlyRené Scharfe, Sep 13, 2014
  2. Stefan BellerSep 13, 2014
  3. Jeff KingSep 13, 2014
  4. 1/3 prune-packed: fix minor memory leakJeff King, Sep 13, 2014
  5. 2/3 make update-server-info more robustJeff King, Sep 13, 2014
  6. René ScharfeSep 14, 2014
  7. Junio C HamanoSep 15, 2014
  8. Jeff KingSep 15, 2014
  9. 3/3 server-info: clean up after writing info/packsJeff King, Sep 13, 2014

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.