Fix a potential segfault
[sgt/putty] / psftp.c
diff --git a/psftp.c b/psftp.c
index deef6d8..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;
     }