mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
Improve channel_request_exec1().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@733 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -190,11 +190,8 @@ int channel_request_exec1(CHANNEL *channel, const char *cmd) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (buffer_add_u8(session->out_buffer, SSH_CMSG_EXEC_CMD) < 0) {
|
||||
string_free(command);
|
||||
return -1;
|
||||
}
|
||||
if (buffer_add_ssh_string(session->out_buffer, command) < 0) {
|
||||
if (buffer_add_u8(session->out_buffer, SSH_CMSG_EXEC_CMD) < 0 ||
|
||||
buffer_add_ssh_string(session->out_buffer, command) < 0) {
|
||||
string_free(command);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user