pki: Don't leak memory in pubkey to blob.

This commit is contained in:
Andreas Schneider
2012-10-07 22:36:06 +02:00
parent 996b7cae26
commit 5f0f334d1c

View File

@@ -855,12 +855,13 @@ ssh_string pki_publickey_to_blob(const ssh_key key)
rc = buffer_add_ssh_string(buffer, e);
if (rc < 0) {
ssh_string_burn(e);
ssh_string_free(e);
goto fail;
}
ssh_string_burn(e);
ssh_string_free(e);
e = NULL;
break;
#endif
case SSH_KEYTYPE_UNKNOWN: