diff --git a/src/pki_crypto.c b/src/pki_crypto.c index a184eb44..b0d8660e 100644 --- a/src/pki_crypto.c +++ b/src/pki_crypto.c @@ -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: