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>
Jeff King committed
Jan 11, 2012 at 22:05 UTC
37475f97d1fbab0842c17b175263eeba6cd5e318
1 file changed
+1
attr.c
+1
@@ -286,6 +286,7 @@ static void free_attr_elem(struct attr_stack *e)
286
}
287
free(a);
288
}
289
+ free(e->attrs);
290
free(e);
291
}
292