Round #1 of scan-build warnings cleanup

This commit is contained in:
Nicolas Williams
2016-11-15 19:38:04 -06:00
parent 274021f7db
commit 953dc07391
13 changed files with 53 additions and 39 deletions

View File

@@ -405,7 +405,7 @@ krb5_pac_get_types(krb5_context context,
{
size_t i;
*types = calloc(p->pac->numbuffers, sizeof(*types));
*types = calloc(p->pac->numbuffers, sizeof(**types));
if (*types == NULL) {
*len = 0;
return krb5_enomem(context);
@@ -549,6 +549,8 @@ create_checksum(krb5_context context,
if (cksumtype == (uint32_t)CKSUMTYPE_HMAC_MD5) {
ret = HMAC_MD5_any_checksum(context, key, data, datalen,
KRB5_KU_OTHER_CKSUM, &cksum);
if (ret)
return ret;
} else {
ret = krb5_crypto_init(context, key, 0, &crypto);
if (ret)