diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2013-07-24 17:38:27 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-07-24 17:38:27 +0200 |
commit | 61084b76f67cafd8a40616d8e61b179a91acad02 (patch) | |
tree | 069bb6658145f340e6a8339cea41dadf840c39ae /examples/samplesshd-tty.c | |
parent | c55ab44caf092189aa6bc402ad1f470fb832f2ed (diff) | |
download | libssh-61084b76f67cafd8a40616d8e61b179a91acad02.tar.gz libssh-61084b76f67cafd8a40616d8e61b179a91acad02.tar.xz libssh-61084b76f67cafd8a40616d8e61b179a91acad02.zip |
example: Fix a memory leak on error in tty server.
CID: #1032746
Diffstat (limited to 'examples/samplesshd-tty.c')
-rw-r--r-- | examples/samplesshd-tty.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/examples/samplesshd-tty.c b/examples/samplesshd-tty.c index a19071d4..7ed70d3d 100644 --- a/examples/samplesshd-tty.c +++ b/examples/samplesshd-tty.c @@ -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; } |