aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/examples/read_ssh.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/doc/examples/read_ssh.cpp b/doc/examples/read_ssh.cpp
index 0392786a5..7ef81b346 100644
--- a/doc/examples/read_ssh.cpp
+++ b/doc/examples/read_ssh.cpp
@@ -8,12 +8,13 @@
* Example of reading SSH2 format public keys (see RFC 4716)
*/
-#include <fstream>
#include <botan/x509_key.h>
#include <botan/filters.h>
#include <botan/loadstor.h>
#include <botan/rsa.h>
#include <botan/dsa.h>
+#include <fstream>
+#include <memory>
using namespace Botan;
@@ -115,7 +116,7 @@ int main()
{
LibraryInitializer init;
- Public_Key* key = read_ssh_pubkey("dsa.ssh");
+ std::unique_ptr<Public_Key> key(read_ssh_pubkey("dsa.ssh"));
if(key == 0)
{