Skip to content
/ git Public
forked from git/git

Commit

Permalink
attr: fix leak in free_attr_elem
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
peff authored and gitster committed Jan 12, 2012
1 parent 592ed56 commit 37475f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ static void free_attr_elem(struct attr_stack *e)
}
free(a);
}
free(e->attrs);
free(e);
}

Expand Down

0 comments on commit 37475f9

Please sign in to comment.