Skip to content

Commit 17d68a5

Browse files
drafnelgitster
authored andcommitted
refs.c: free duplicate entries in the ref array instead of leaking them
Signed-off-by: Brandon Casey <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6872969 commit 17d68a5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

refs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ static void sort_ref_array(struct ref_array *array)
9494
die("Duplicated ref, and SHA1s don't match: %s",
9595
a->name);
9696
warning("Duplicated ref: %s", a->name);
97+
free(b);
9798
continue;
9899
}
99100
i++;

0 commit comments

Comments
 (0)