Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Matt Johnston
dropbear
Commits
bda3bc4c
Commit
bda3bc4c
authored
May 10, 2017
by
Matt Johnston
Browse files
free forced_command
parent
93f3c318
Changes
1
Hide whitespace changes
Inline
Side-by-side
svr-authpubkeyoptions.c
View file @
bda3bc4c
...
...
@@ -95,6 +95,7 @@ void svr_pubkey_set_forced_command(struct ChanSess *chansess) {
if
(
chansess
->
cmd
)
{
/* original_command takes ownership */
chansess
->
original_command
=
chansess
->
cmd
;
chansess
->
cmd
=
NULL
;
}
else
{
chansess
->
original_command
=
m_strdup
(
""
);
}
...
...
@@ -108,6 +109,9 @@ void svr_pubkey_set_forced_command(struct ChanSess *chansess) {
/* Free potential public key options */
void
svr_pubkey_options_cleanup
()
{
if
(
ses
.
authstate
.
pubkey_options
)
{
if
(
ses
.
authstate
.
pubkey_options
->
forced_command
)
{
m_free
(
ses
.
authstate
.
pubkey_options
->
forced_command
);
}
m_free
(
ses
.
authstate
.
pubkey_options
);
ses
.
authstate
.
pubkey_options
=
NULL
;
}
...
...
@@ -200,8 +204,7 @@ next_option:
bad_option:
ret
=
DROPBEAR_FAILURE
;
m_free
(
ses
.
authstate
.
pubkey_options
);
ses
.
authstate
.
pubkey_options
=
NULL
;
svr_pubkey_options_cleanup
();
dropbear_log
(
LOG_WARNING
,
"Bad public key options at %s:%d"
,
filename
,
line_num
);
end:
...
...
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