1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-05-28 17:41:28 +03:00

example: Fix a memory leak on error in tty server.

CID: #1032746
This commit is contained in:
Andreas Schneider 2013-07-24 17:38:27 +02:00
parent c55ab44caf
commit 61084b76f6

View File

@ -321,6 +321,7 @@ static int main_loop(ssh_channel chan) {
rc = ssh_event_dopoll(event, 1000);
if (rc == SSH_ERROR){
fprintf(stderr, "Error : %s\n", ssh_get_error(session));
ssh_event_free(event);
ssh_disconnect(session);
return -1;
}