fix null pointer dereference errors

Change-Id: I82a849afe9f432a1084ad2505ce88b1fe4d3d3af
This commit is contained in:
Jeffrey Altman
2019-01-04 01:02:59 -05:00
parent 735039dbdc
commit 00c590e4ff
5 changed files with 21 additions and 2 deletions

View File

@@ -541,6 +541,8 @@ fcc_initialize(krb5_context context,
{
krb5_storage *sp;
sp = krb5_storage_emem();
if (sp == NULL)
return krb5_enomem(context);
krb5_storage_set_eof_code(sp, KRB5_CC_END);
if(context->fcache_vno != 0)
f->version = context->fcache_vno;
@@ -625,6 +627,8 @@ fcc_store_cred(krb5_context context,
krb5_storage *sp;
sp = krb5_storage_emem();
if (sp == NULL)
return krb5_enomem(context);
krb5_storage_set_eof_code(sp, KRB5_CC_END);
storage_set_flags(context, sp, FCACHE(id)->version);
ret = krb5_store_creds(sp, creds);