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>
Brandon Casey committed
Oct 7, 2011 at 22:20 UTC
17d68a54def69b20b39dd4f7323b359a827e6017
1 file changed
+1
refs.c
+1
@@ -94,6 +94,7 @@ static void sort_ref_array(struct ref_array *array)
94
die("Duplicated ref, and SHA1s don't match: %s",
95
a->name);
96
warning("Duplicated ref: %s", a->name);
97
+ free(b);
98
continue;
99
}
100
i++;