Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9728cfd

Browse files
Make sure we don't leak memory again.
1 parent edbaa63 commit 9728cfd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/transports/local.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,13 @@ static int local_close(git_transport *transport)
599599
static void local_free(git_transport *transport)
600600
{
601601
transport_local *t = (transport_local *)transport;
602+
size_t i;
603+
git_remote_head *head;
604+
605+
git_vector_foreach(&t->refs, i, head) {
606+
git__free(head->name);
607+
git__free(head);
608+
}
602609

603610
git_vector_free(&t->refs);
604611

0 commit comments

Comments
 (0)