Code

attr: plug minor memory leak
authorRené Scharfe <rene.scharfe@lsrfire.ath.cx>
Tue, 30 Jun 2009 22:30:00 +0000 (00:30 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Jun 2009 23:12:24 +0000 (16:12 -0700)
Free the memory allocated for struct strbuf pathbuf when we're done.

Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
attr.c

diff --git a/attr.c b/attr.c
index f8f6faa94fd7eb4e260a75b82ef372e632f5eb9a..55bdb7cdebea7f7ea551231fe7801f272d128d69 100644 (file)
--- 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.
         */