fix #788 pkcs15-tool --read-ssh-key crash
Don't try to free again pubkey if the parent cert has already been freed. Signed-off-by: Nuno Goncalves <nunojpg@gmail.com>
This commit is contained in:
parent
9066d8f999
commit
d97ee79333
|
@ -1051,8 +1051,8 @@ static int read_ssh_key(void)
|
||||||
fclose(outf);
|
fclose(outf);
|
||||||
if (cert)
|
if (cert)
|
||||||
sc_pkcs15_free_certificate(cert);
|
sc_pkcs15_free_certificate(cert);
|
||||||
sc_pkcs15_free_pubkey(pubkey);
|
else if (pubkey)
|
||||||
|
sc_pkcs15_free_pubkey(pubkey);
|
||||||
return 0;
|
return 0;
|
||||||
fail:
|
fail:
|
||||||
printf("can't convert key: buffer too small\n");
|
printf("can't convert key: buffer too small\n");
|
||||||
|
|
Loading…
Reference in New Issue