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
8605321d
Commit
8605321d
authored
18 years ago
by
Dan Fandrich
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a memory leak.
parent
d3144530
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/ssh.c
+11
-3
11 additions, 3 deletions
lib/ssh.c
with
11 additions
and
3 deletions
lib/ssh.c
+
11
−
3
View file @
8605321d
...
...
@@ -352,6 +352,12 @@ CURLcode Curl_ssh_connect(struct connectdata *conn, bool *done)
*/
authlist
=
libssh2_userauth_list
(
ssh
->
ssh_session
,
ssh
->
user
,
strlen
(
ssh
->
user
));
if
(
!
authlist
)
{
libssh2_session_free
(
ssh
->
ssh_session
);
ssh
->
ssh_session
=
NULL
;
Curl_safefree
(
ssh
->
path
);
return
CURLE_OUT_OF_MEMORY
;
}
infof
(
data
,
"SSH authentication methods available: %s
\n
"
,
authlist
);
/*
...
...
@@ -410,6 +416,8 @@ CURLcode Curl_ssh_connect(struct connectdata *conn, bool *done)
infof
(
conn
->
data
,
"Initialized keyboard interactive authentication
\n
"
);
}
}
Curl_safefree
((
void
*
)
authlist
);
authlist
=
NULL
;
if
(
!
authed
)
{
failf
(
data
,
"Authentication failure
\n
"
);
...
...
@@ -460,7 +468,7 @@ CURLcode Curl_ssh_connect(struct connectdata *conn, bool *done)
}
}
/* Check for /~/ , indicating re
a
lative to the users home directory */
/* Check for /~/ , indicating relative to the user
'
s home directory */
if
(
conn
->
protocol
==
PROT_SCP
)
{
real_path
=
(
char
*
)
malloc
(
working_path_len
+
1
);
if
(
real_path
==
NULL
)
{
...
...
@@ -546,7 +554,7 @@ CURLcode Curl_scp_do(struct connectdata *conn, bool *done)
}
else
{
/*
* We must check the remote file
,
if it is a directory no va
u
les will
* We must check the remote file
;
if it is a directory no val
u
es will
* be set in sb
*/
curl_off_t
bytecount
;
...
...
@@ -782,7 +790,7 @@ CURLcode Curl_sftp_do(struct connectdata *conn, bool *done)
attrs
.
filesize
);
}
if
(
attrs
.
flags
&
LIBSSH2_SFTP_ATTR_ACMODTIME
)
{
const
char
*
months
[
12
]
=
{
static
const
char
*
const
months
[
12
]
=
{
"Jan"
,
"Feb"
,
"Mar"
,
"Apr"
,
"May"
,
"Jun"
,
"Jul"
,
"Aug"
,
"Sep"
,
"Oct"
,
"Nov"
,
"Dec"
};
struct
tm
*
nowParts
;
...
...
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