Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
717adfeb
Commit
717adfeb
authored
18 years ago
by
Dan Fandrich
Browse files
Options
Downloads
Patches
Plain Diff
Rearranged some allocs so they will be freed correctly in the error path.
parent
503557e5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/url.c
+14
-14
14 additions, 14 deletions
lib/url.c
with
14 additions
and
14 deletions
lib/url.c
+
14
−
14
View file @
717adfeb
...
...
@@ -2860,14 +2860,6 @@ static CURLcode CreateConnection(struct SessionHandle *data,
any failure */
*
in_connect
=
conn
;
if
(
data
->
multi
&&
Curl_multi_canPipeline
(
data
->
multi
)
&&
!
conn
->
master_buffer
)
{
/* Allocate master_buffer to be used for pipelining */
conn
->
master_buffer
=
calloc
(
BUFSIZE
,
sizeof
(
char
));
if
(
!
conn
->
master_buffer
)
return
CURLE_OUT_OF_MEMORY
;
}
/* and we setup a few fields in case we end up actually using this struct */
conn
->
data
=
data
;
/* Setup the association between this connection
...
...
@@ -2894,12 +2886,6 @@ static CURLcode CreateConnection(struct SessionHandle *data,
conn
->
read_pos
=
0
;
conn
->
buf_len
=
0
;
/* Initialize the pipeline lists */
conn
->
send_pipe
=
Curl_llist_alloc
((
curl_llist_dtor
)
llist_dtor
);
conn
->
recv_pipe
=
Curl_llist_alloc
((
curl_llist_dtor
)
llist_dtor
);
if
(
!
conn
->
send_pipe
||
!
conn
->
recv_pipe
)
return
CURLE_OUT_OF_MEMORY
;
/* Store creation time to help future close decision making */
conn
->
created
=
Curl_tvnow
();
...
...
@@ -2910,6 +2896,20 @@ static CURLcode CreateConnection(struct SessionHandle *data,
conn
->
bits
.
ftp_use_epsv
=
data
->
set
.
ftp_use_epsv
;
conn
->
bits
.
ftp_use_eprt
=
data
->
set
.
ftp_use_eprt
;
if
(
data
->
multi
&&
Curl_multi_canPipeline
(
data
->
multi
)
&&
!
conn
->
master_buffer
)
{
/* Allocate master_buffer to be used for pipelining */
conn
->
master_buffer
=
calloc
(
BUFSIZE
,
sizeof
(
char
));
if
(
!
conn
->
master_buffer
)
return
CURLE_OUT_OF_MEMORY
;
}
/* Initialize the pipeline lists */
conn
->
send_pipe
=
Curl_llist_alloc
((
curl_llist_dtor
)
llist_dtor
);
conn
->
recv_pipe
=
Curl_llist_alloc
((
curl_llist_dtor
)
llist_dtor
);
if
(
!
conn
->
send_pipe
||
!
conn
->
recv_pipe
)
return
CURLE_OUT_OF_MEMORY
;
/* This initing continues below, see the comment "Continue connectdata
* initialization here" */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment