kdc: _kdc_do_kx509 prevent use of NULL cprincipal
If the return code is non-zero do not call krb5_unparse_name() as cprincipal will be NULL. Change-Id: I901b3f5dcdbc186f89257aef935b91e1d207119c
This commit is contained in:
@@ -940,7 +940,8 @@ _kdc_do_kx509(kx509_req_context r)
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = krb5_unparse_name(r->context, cprincipal, &r->cname);
|
if (ret == 0)
|
||||||
|
ret = krb5_unparse_name(r->context, cprincipal, &r->cname);
|
||||||
|
|
||||||
/* Check that the service name is a valid kx509 service name */
|
/* Check that the service name is a valid kx509 service name */
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
|
Reference in New Issue
Block a user