diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2011-04-15 19:05:53 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-04-15 19:05:53 +0200 |
commit | 644145a88caf0ff9cbfa16902c775b922578357b (patch) | |
tree | e3269574337b6c60ad4a93b3bd565d5997e88c36 /examples/libsshpp.cpp | |
parent | ef658b4bef82670b6064078df355d6b6cf5ac999 (diff) | |
download | libssh-644145a88caf0ff9cbfa16902c775b922578357b.tar.gz libssh-644145a88caf0ff9cbfa16902c775b922578357b.tar.xz libssh-644145a88caf0ff9cbfa16902c775b922578357b.zip |
examples: Fix some memory leaks.
Diffstat (limited to 'examples/libsshpp.cpp')
-rw-r--r-- | examples/libsshpp.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/libsshpp.cpp b/examples/libsshpp.cpp index c5c26052..05fa7499 100644 --- a/examples/libsshpp.cpp +++ b/examples/libsshpp.cpp @@ -16,7 +16,7 @@ program. #include <libssh/libsshpp.hpp> int main(int argc, const char **argv){ - ssh::Session session,s2; + ssh::Session session; try { if(argc>1) session.setOption(SSH_OPTIONS_HOST,argv[1]); @@ -24,10 +24,10 @@ int main(int argc, const char **argv){ session.setOption(SSH_OPTIONS_HOST,"localhost"); session.connect(); session.userauthAutopubkey(); + session.disconnect(); } catch (ssh::SshException e){ std::cout << "Error during connection : "; std::cout << e.getError() << std::endl; } - //s2=session; return 0; } |