threads / patch / 19987

patchattr: plug minor memory leak

Subject: [PATCH] attr: plug minor memory leak

## tl;dr

One message between Jun 30, 2009 and Jun 30, 2009. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

René Scharfe· Jun 30, 2009, 22:30 UTC · lore
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(-)
Show changes to attr.c +2 −0
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

← back to recent threads