Fix various trivial compiler warnings
[u/mdw/putty] / psftp.c
diff --git a/psftp.c b/psftp.c
index f4c254a..0cf01be 100644 (file)
--- a/psftp.c
+++ b/psftp.c
@@ -406,7 +406,6 @@ int sftp_cmd_put(struct sftp_command *cmd) {
     fp = fopen(fname, "rb");
     if (!fp) {
        printf("local: unable to open %s\n", fname);
-        fxp_close(fh);
        sfree(outfname);
        return 0;
     }
@@ -590,6 +589,7 @@ void do_sftp(void) {
        fprintf(stderr,
                "Fatal: unable to initialise SFTP: %s\n",
                fxp_error());
+       return;
     }
 
     /*