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>
This commit is contained in:
Jeff King 2012-01-11 22:05:03 -05:00 committed by Junio C Hamano
parent 592ed5673e
commit 37475f97d1

1
attr.c
View File

@ -286,6 +286,7 @@ static void free_attr_elem(struct attr_stack *e)
}
free(a);
}
free(e->attrs);
free(e);
}