Skip to content

Commit 37475f9

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 592ed56 commit 37475f9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

attr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,7 @@ static void free_attr_elem(struct attr_stack *e)
286286
}
287287
free(a);
288288
}
289+
free(e->attrs);
289290
free(e);
290291
}
291292

0 commit comments

Comments
 (0)