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
c27cc688
Commit
c27cc688
authored
11 years ago
by
Steve Holme
Browse files
Options
Downloads
Patches
Plain Diff
tool_operate: Moved easy handle cleanup into tool_main
parent
0af2322b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/tool_cfgable.c
+2
-8
2 additions, 8 deletions
src/tool_cfgable.c
src/tool_main.c
+5
-1
5 additions, 1 deletion
src/tool_main.c
src/tool_operate.c
+2
-13
2 additions, 13 deletions
src/tool_operate.c
with
9 additions
and
22 deletions
src/tool_cfgable.c
+
2
−
8
View file @
c27cc688
...
...
@@ -154,19 +154,13 @@ void config_free(struct OperationConfig *config)
{
struct
OperationConfig
*
last
=
config
;
/* Find the last config structure */
while
(
last
->
next
)
last
=
last
->
next
;
/* Free each of the structures in reverse order */
do
{
while
(
last
)
{
struct
OperationConfig
*
prev
=
last
->
prev
;
if
(
prev
)
last
->
easy
=
NULL
;
free_config_fields
(
last
);
free
(
last
);
last
=
prev
;
}
while
(
last
);
}
}
This diff is collapsed.
Click to expand it.
src/tool_main.c
+
5
−
1
View file @
c27cc688
...
...
@@ -172,13 +172,17 @@ static CURLcode main_init(struct GlobalConfig *config)
*/
static
void
main_free
(
struct
GlobalConfig
*
config
)
{
/* Cleanup the easy handle */
curl_easy_cleanup
(
config
->
easy
);
config
->
easy
=
NULL
;
/* Main cleanup */
curl_global_cleanup
();
convert_cleanup
();
metalink_cleanup
();
/* Free the config structures */
config_free
(
config
->
fir
st
);
config_free
(
config
->
la
st
);
config
->
first
=
NULL
;
config
->
last
=
NULL
;
}
...
...
This diff is collapsed.
Click to expand it.
src/tool_operate.c
+
2
−
13
View file @
c27cc688
...
...
@@ -1772,18 +1772,10 @@ static CURLcode operate_do(struct OperationConfig *config)
dumpeasysrc
(
config
);
#endif
return
(
CURLcode
)
res
;
}
static
void
operate_free
(
struct
OperationConfig
*
config
)
{
if
(
config
->
easy
)
{
curl_easy_cleanup
(
config
->
easy
);
config
->
easy
=
NULL
;
}
/* Release metalink related resources here */
clean_metalink
(
config
);
return
(
CURLcode
)
res
;
}
CURLcode
operate
(
struct
GlobalConfig
*
config
,
int
argc
,
argv_item_t
argv
[])
...
...
@@ -1851,8 +1843,5 @@ CURLcode operate(struct GlobalConfig *config, int argc, argv_item_t argv[])
}
}
/* Perform the cleanup */
operate_free
(
config
->
first
);
return
result
;
}
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