mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-12-02 01:17:52 +03:00
Fixed a memory leak in channel_new() if we have an error.
This commit is contained in:
@@ -79,6 +79,7 @@ ssh_channel channel_new(ssh_session session) {
|
||||
|
||||
channel->stderr_buffer = buffer_new();
|
||||
if (channel->stderr_buffer == NULL) {
|
||||
SAFE_FREE(channel->stdout_buffer);
|
||||
SAFE_FREE(channel);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user