(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:
@@ -164,6 +164,10 @@ hx509_cert_free(hx509_cert cert)
|
|||||||
_hx509_abort("refcount <= 0");
|
_hx509_abort("refcount <= 0");
|
||||||
if (--cert->ref > 0)
|
if (--cert->ref > 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (cert->private_key)
|
||||||
|
_hx509_free_private_key(&cert->private_key);
|
||||||
|
|
||||||
free_Certificate(cert->data);
|
free_Certificate(cert->data);
|
||||||
free(cert->data);
|
free(cert->data);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user