From 592ed5673e3074a0d7e0a6d6626faa783c327c29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Wed, 11 Jan 2012 10:21:38 +0700 Subject: t2203: fix wrong commit command MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add commit message to avoid commit's aborting due to the lack of commit message, not because there are INTENT_TO_ADD entries in index. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- t/t2203-add-intent.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t2203-add-intent.sh b/t/t2203-add-intent.sh index 58a329961..25435290a 100755 --- a/t/t2203-add-intent.sh +++ b/t/t2203-add-intent.sh @@ -41,7 +41,7 @@ test_expect_success 'cannot commit with i-t-a entry' ' echo frotz >nitfol && git add rezrov && git add -N nitfol && - test_must_fail git commit + test_must_fail git commit -m initial ' test_expect_success 'can commit with an unrelated i-t-a entry in index' ' -- cgit v1.2.1 From 37475f97d1fbab0842c17b175263eeba6cd5e318 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 11 Jan 2012 22:05:03 -0500 Subject: 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); } -- cgit v1.2.1