summaryrefslogtreecommitdiff
path: root/refs.c
diff options
context:
space:
mode:
authorBrandon Casey <drafnel@gmail.com>2011-10-07 22:20:22 -0500
committerJunio C Hamano <gitster@pobox.com>2011-10-10 10:05:39 -0700
commit17d68a54def69b20b39dd4f7323b359a827e6017 (patch)
treed2a0005c68f0150e5c1961cbb4b73e9920049787 /refs.c
parent687296960d774a45df31df7bc371d01106a6f6b7 (diff)
downloadgit-17d68a54def69b20b39dd4f7323b359a827e6017.tar.gz
refs.c: free duplicate entries in the ref array instead of leaking them
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'refs.c')
-rw-r--r--refs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/refs.c b/refs.c
index cbc4c5d28d..df39297604 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++;