Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
5b4a7083
Commit
5b4a7083
authored
Jun 24, 2013
by
Russell Belfer
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1675 from arthurschreiber/fix-leak-in-local-transport
Fix a leak in the local transport code.
parents
12212258
8c510b83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
src/transports/local.c
+9
-9
No files found.
src/transports/local.c
View file @
5b4a7083
...
...
@@ -571,6 +571,8 @@ static void local_cancel(git_transport *transport)
static
int
local_close
(
git_transport
*
transport
)
{
transport_local
*
t
=
(
transport_local
*
)
transport
;
size_t
i
;
git_remote_head
*
head
;
t
->
connected
=
0
;
...
...
@@ -584,25 +586,23 @@ static int local_close(git_transport *transport)
t
->
url
=
NULL
;
}
git_vector_foreach
(
&
t
->
refs
,
i
,
head
)
{
git__free
(
head
->
name
);
git__free
(
head
);
}
git_vector_free
(
&
t
->
refs
);
return
0
;
}
static
void
local_free
(
git_transport
*
transport
)
{
transport_local
*
t
=
(
transport_local
*
)
transport
;
size_t
i
;
git_remote_head
*
head
;
/* Close the transport, if it's still open. */
local_close
(
transport
);
git_vector_foreach
(
&
t
->
refs
,
i
,
head
)
{
git__free
(
head
->
name
);
git__free
(
head
);
}
git_vector_free
(
&
t
->
refs
);
/* Free the transport */
git__free
(
t
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment