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

[PATCH] attr: plug minor memory leak

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Jun 30, 2009, 22:30 UTC
Message-ID
<4A4A91E8.6060604@lsrfire.ath.cx>
Free the memory allocated for struct strbuf pathbuf when we're done.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
---
 attr.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/attr.c b/attr.c
index f8f6faa..55bdb7c 100644
--- a/attr.c
+++ b/attr.c
@@ -555,6 +555,8 @@ static void prepare_attr_stack(const char *path, int dirlen)
 		}
 	}
 
+	strbuf_release(&pathbuf);
+
 	/*
 	 * Finally push the "info" one at the top of the stack.
 	 */
-- 
1.6.3.3
Message 1 of 1 in “attr: plug minor memory leak”
  1. attr: plug minor memory leakRené Scharfe, Jun 30, 2009

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.