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.7.6~4^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/37475f97d1fbab0842c17b175263eeba6cd5e318?hp=--cc 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 --- 37475f97d1fbab0842c17b175263eeba6cd5e318 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); }