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
21e6a11a
Commit
21e6a11a
authored
Oct 07, 2017
by
Edward Thomson
Committed by
GitHub
Oct 07, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4359 from libgit2/cmn/proxy-options-free
Plug some leaks in curl's proxy handling
parents
58deac77
25fdb3f0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
0 deletions
+10
-0
src/curl_stream.c
+3
-0
src/proxy.c
+6
-0
src/proxy.h
+1
-0
No files found.
src/curl_stream.c
View file @
21e6a11a
...
...
@@ -195,6 +195,7 @@ static int curls_set_proxy(git_stream *stream, const git_proxy_options *proxy_op
CURLcode
res
;
curl_stream
*
s
=
(
curl_stream
*
)
stream
;
git_proxy_options_clear
(
&
s
->
proxy
);
if
((
error
=
git_proxy_options_dup
(
&
s
->
proxy
,
proxy_opts
))
<
0
)
return
error
;
...
...
@@ -295,6 +296,8 @@ static void curls_free(git_stream *stream)
curls_close
(
stream
);
git_strarray_free
(
&
s
->
cert_info_strings
);
git_proxy_options_clear
(
&
s
->
proxy
);
git_cred_free
(
s
->
proxy_cred
);
git__free
(
s
);
}
...
...
src/proxy.c
View file @
21e6a11a
...
...
@@ -31,3 +31,9 @@ int git_proxy_options_dup(git_proxy_options *tgt, const git_proxy_options *src)
return
0
;
}
void
git_proxy_options_clear
(
git_proxy_options
*
opts
)
{
git__free
((
char
*
)
opts
->
url
);
opts
->
url
=
NULL
;
}
src/proxy.h
View file @
21e6a11a
...
...
@@ -12,5 +12,6 @@
#include "git2/proxy.h"
extern
int
git_proxy_options_dup
(
git_proxy_options
*
tgt
,
const
git_proxy_options
*
src
);
extern
void
git_proxy_options_clear
(
git_proxy_options
*
opts
);
#endif
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