]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - windows/winpgnt.c
Handle packets with no type byte by returning SSH_MSG_UNIMPLEMENTED.
[PuTTY.git] / windows / winpgnt.c
index fa4d1d101c33c6113fad3353967ee7911ca292be..7bdf6378f956f760b4a4a3d48207c6812536030f 100644 (file)
@@ -377,11 +377,11 @@ static void win_add_keyfile(Filename *filename)
                                 NULL, PassphraseProc, (LPARAM) &pps);
         passphrase_box = NULL;
 
-        sfree(err);
-
         if (!dlgret)
             goto done;                /* operation cancelled */
 
+        sfree(err);
+
         assert(passphrase != NULL);
 
         ret = pageant_add_keyfile(filename, passphrase, &err);