Round #3 of scan-build warnings cleanup

This commit is contained in:
Nicolas Williams
2016-11-16 23:27:27 -06:00
parent 1c81ddf4e2
commit 7fa85e6d6d
10 changed files with 32 additions and 16 deletions

View File

@@ -162,15 +162,15 @@ parse_key_set(krb5_context context, const char *key,
continue;
}
{
/* if there is a final string, use it as the string to
salt with, this is mostly useful with null salt for
v4 compat, and a cell name for afs compat */
salt->saltvalue.data = strdup(buf[i]);
if (salt->saltvalue.data == NULL)
return krb5_enomem(context);
salt->saltvalue.length = strlen(buf[i]);
}
if (salt->saltvalue.data != NULL)
free(salt->saltvalue.data);
/* if there is a final string, use it as the string to
salt with, this is mostly useful with null salt for
v4 compat, and a cell name for afs compat */
salt->saltvalue.data = strdup(buf[i]);
if (salt->saltvalue.data == NULL)
return krb5_enomem(context);
salt->saltvalue.length = strlen(buf[i]);
}
if(enctypes == NULL || salt->salttype == 0) {