From b2d0d13a2d6709c740453ee3ff32bc37160cc331 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Garcia Ballester Date: Sun, 9 Jul 2006 10:36:44 +0000 Subject: Add ssh_finalize to handle finalization of libssh and underlying cryptographic library. Add corresponding paragraph in API draft. git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@75 7dcaeef0-15fb-0310-b436-a5af3365683c --- samplesshd.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'samplesshd.c') diff --git a/samplesshd.c b/samplesshd.c index d51ac318..fe45562b 100644 --- a/samplesshd.c +++ b/samplesshd.c @@ -94,6 +94,7 @@ int main(int argc, char **argv){ } while (!auth); if(!auth){ printf("error : %s\n",ssh_get_error(session)); + ssh_finalize(); return 1; } do { @@ -113,6 +114,7 @@ int main(int argc, char **argv){ } while(message && !chan); if(!chan){ printf("error : %s\n",ssh_get_error(session)); + ssh_finalize(); return 1; } do { @@ -142,6 +144,7 @@ int main(int argc, char **argv){ write(1,buffer_get(buf),buffer_get_len(buf)); } while (i>0); ssh_disconnect(session); + ssh_finalize(); return 0; } -- cgit v1.2.3