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
240b6fed
Commit
240b6fed
authored
Feb 05, 2016
by
Carlos Martín Nieto
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3578 from bubaflub/fix_small_memory_leak
Free allocated pointer to curl stream on error
parents
efa8208c
8bd1c19e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletions
+4
-1
src/curl_stream.c
+4
-1
No files found.
src/curl_stream.c
View file @
240b6fed
...
...
@@ -207,11 +207,14 @@ int git_curl_stream_new(git_stream **out, const char *host, const char *port)
handle
=
curl_easy_init
();
if
(
handle
==
NULL
)
{
giterr_set
(
GITERR_NET
,
"failed to create curl handle"
);
git__free
(
st
);
return
-
1
;
}
if
((
error
=
git__strtol32
(
&
iport
,
port
,
NULL
,
10
))
<
0
)
if
((
error
=
git__strtol32
(
&
iport
,
port
,
NULL
,
10
))
<
0
)
{
git__free
(
st
);
return
error
;
}
curl_easy_setopt
(
handle
,
CURLOPT_URL
,
host
);
curl_easy_setopt
(
handle
,
CURLOPT_ERRORBUFFER
,
st
->
curl_error
);
...
...
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