do not leak existing comment

This commit is contained in:
Markus Friedl
2012-03-27 20:43:01 +02:00
parent 0de3e0e043
commit 19d6c6ae8b

View File

@@ -202,7 +202,7 @@ add_file(int agent_fd, const char *filename, int key_only)
if (strcmp(pass, "") == 0)
goto fail_load;
if ((r = sshkey_parse_private(&keyblob, pass, filename,
&private, &comment)) == 0)
&private, NULL)) == 0)
break;
else if (r != SSH_ERR_KEY_WRONG_PASSPHRASE) {
fprintf(stderr,