diff --git a/src/pki_crypto.c b/src/pki_crypto.c index 4f42f322..ec9cfa4b 100644 --- a/src/pki_crypto.c +++ b/src/pki_crypto.c @@ -833,6 +833,7 @@ ssh_string pki_private_key_to_pem(const ssh_key key, rc = ssh_string_fill(blob, buf->data, buf->length); if (rc < 0) { + ssh_string_free(blob); goto err; }