From 37475f97d1fbab0842c17b175263eeba6cd5e318 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 11 Jan 2012 22:05:03 -0500 Subject: [PATCH] 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 --- attr.c | 1 + 1 file changed, 1 insertion(+) 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); } -- 2.30.2