X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/5462f4596108c4309fb69b4e57aa1e59d7100908..fe2582735a7206a4e855955d521a58f41f235211:/import.c diff --git a/import.c b/import.c index 32a1ac5d..f6dc2809 100644 --- a/import.c +++ b/import.c @@ -372,6 +372,7 @@ static struct openssh_key *load_openssh_key(const Filename *filename, if (0 == strncmp(line, "-----END ", 9) && 0 == strcmp(line+strlen(line)-16, "PRIVATE KEY-----")) { sfree(line); + line = NULL; break; /* done */ } if ((p = strchr(line, ':')) != NULL) { @@ -1095,6 +1096,7 @@ static struct sshcom_key *load_sshcom_key(const Filename *filename, strip_crlf(line); if (!strcmp(line, "---- END SSH2 ENCRYPTED PRIVATE KEY ----")) { sfree(line); + line = NULL; break; /* done */ } if ((p = strchr(line, ':')) != NULL) {