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>
This commit is contained in:
parent
687296960d
commit
17d68a54de
1
refs.c
1
refs.c
@ -94,6 +94,7 @@ static void sort_ref_array(struct ref_array *array)
|
|||||||
die("Duplicated ref, and SHA1s don't match: %s",
|
die("Duplicated ref, and SHA1s don't match: %s",
|
||||||
a->name);
|
a->name);
|
||||||
warning("Duplicated ref: %s", a->name);
|
warning("Duplicated ref: %s", a->name);
|
||||||
|
free(b);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
|
Loading…
Reference in New Issue
Block a user