summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2012-01-11 22:05:03 -0500
committerJunio C Hamano <gitster@pobox.com>2012-01-11 19:07:23 -0800
commit37475f97d1fbab0842c17b175263eeba6cd5e318 (patch)
tree32042255fc99d6135d33605d65d635b8b4cb8a66
parent592ed5673e3074a0d7e0a6d6626faa783c327c29 (diff)
downloadgit-37475f97d1fbab0842c17b175263eeba6cd5e318.tar.gz
attr: fix leak in free_attr_elem
This function frees the individual "struct match_attr"s we have allocated, but forgot to free the array holding their pointers, leading to a minor memory leak (but it can add up after checking attributes for paths in many directories). Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--attr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/attr.c b/attr.c
index 2ce7365138..af4083582d 100644
--- a/attr.c
+++ b/attr.c
@@ -286,6 +286,7 @@ static void free_attr_elem(struct attr_stack *e)
}
free(a);
}
+ free(e->attrs);
free(e);
}