From 17d68a54def69b20b39dd4f7323b359a827e6017 Mon Sep 17 00:00:00 2001 From: Brandon Casey Date: Fri, 7 Oct 2011 22:20:22 -0500 Subject: [PATCH] refs.c: free duplicate entries in the ref array instead of leaking them Signed-off-by: Brandon Casey Signed-off-by: Junio C Hamano --- refs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/refs.c b/refs.c index cbc4c5d28..df3929760 100644 --- a/refs.c +++ b/refs.c @@ -94,6 +94,7 @@ static void sort_ref_array(struct ref_array *array) die("Duplicated ref, and SHA1s don't match: %s", a->name); warning("Duplicated ref: %s", a->name); + free(b); continue; } i++; -- 2.30.2