From: Jeff King Date: Thu, 12 Jan 2012 03:05:03 +0000 (-0500) Subject: attr: fix leak in free_attr_elem X-Git-Tag: v1.7.9-rc1~6^2^2^2 X-Git-Url: https://git.tokkee.org/?p=git.git;a=commitdiff_plain;h=37475f97d1fbab0842c17b175263eeba6cd5e318 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 Signed-off-by: Junio C Hamano --- diff --git a/attr.c b/attr.c index 2ce736513..af4083582 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); }