blocked new stuff with HAVE_LIBSSH2_KNOWNHOST_API to check if this is our current...
authorGunter Knauf <gk@gknw.de>
Sat, 25 Jul 2009 04:16:00 +0000 (04:16 +0000)
committerGunter Knauf <gk@gknw.de>
Sat, 25 Jul 2009 04:16:00 +0000 (04:16 +0000)
src/main.c

index aeaa588..405ee38 100644 (file)
@@ -4694,16 +4694,19 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
           my_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE);
           my_setopt(curl, CURLOPT_SSL_VERIFYHOST, 1);
         }
+#ifdef HAVE_LIBSSH2_KNOWNHOST_API
         else {
           char *home = homedir();
           char *file = aprintf("%s/%sssh/known_hosts", home, DOT_CHAR);
           if(home && file) {
             free(home);
             my_setopt_str(curl, CURLOPT_SSH_KNOWNHOSTS, file);
+            /* XXX do we need to free file here? */
           }
           else
             return CURLE_OUT_OF_MEMORY;
         }
+#endif
 
         if(config->no_body || config->remote_time) {
           /* no body or use remote time */