(hx509_cert_free): if there is a private key assosited with this cert, free it

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@16441 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-01-03 09:41:48 +00:00
parent 3f88fe5a90
commit ecfef14d45

View File

@@ -164,6 +164,10 @@ hx509_cert_free(hx509_cert cert)
_hx509_abort("refcount <= 0");
if (--cert->ref > 0)
return;
if (cert->private_key)
_hx509_free_private_key(&cert->private_key);
free_Certificate(cert->data);
free(cert->data);