Skip to content

Commit

Permalink
refs.c: free duplicate entries in the ref array instead of leaking them
Browse files Browse the repository at this point in the history
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Brandon Casey authored and Junio C Hamano committed Oct 10, 2011
1 parent 6872969 commit 17d68a5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions refs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit 17d68a5

Please sign in to comment.