tell coverity that ret_princ returns an allocated pointer

This commit is contained in:
Love Hornquist Astrand
2012-11-27 21:20:03 -08:00
parent ed87e9b33a
commit c12dc3fa9d

View File

@@ -1178,6 +1178,7 @@ struct krb5_name_canon_rule {
* @ingroup krb5_principal
*/
/* coverity[+alloc : arg-*4] */
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
krb5_sname_to_principal(krb5_context context,
const char *hostname,
@@ -1190,6 +1191,8 @@ krb5_sname_to_principal(krb5_context context,
register char *cp;
char localname[MAXHOSTNAMELEN];
*ret_princ = NULL;
if ((type != KRB5_NT_UNKNOWN) &&
(type != KRB5_NT_SRV_HST))
return KRB5_SNAME_UNSUPP_NAMETYPE;