From 61084b76f67cafd8a40616d8e61b179a91acad02 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 24 Jul 2013 17:38:27 +0200 Subject: example: Fix a memory leak on error in tty server. CID: #1032746 --- examples/samplesshd-tty.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/samplesshd-tty.c b/examples/samplesshd-tty.c index a19071d..7ed70d3 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; } -- cgit