allow freeing of client_params=NULL cid#54

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24131 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2008-12-11 05:05:00 +00:00
parent 9c92a36dd8
commit e295c94913

View File

@@ -158,6 +158,8 @@ void
_kdc_pk_free_client_param(krb5_context context,
pk_client_params *client_params)
{
if (client_params == NULL)
return;
if (client_params->cert)
hx509_cert_free(client_params->cert);
if (client_params->dh)
@@ -653,9 +655,9 @@ out:
krb5_data_free(&eContent);
der_free_oid(&eContentType);
der_free_oid(&contentInfoOid);
if (ret)
_kdc_pk_free_client_param(context, client_params);
else
if (ret) {
_kdc_pk_free_client_param(context, client_params);
} else
*ret_params = client_params;
return ret;
}