Return an IO error if we run out of memory whilst parsing a key file
Caught by clang-analyzer
Change-Id: I783a193fe9315f08d76d1be9b1c77089df25fd64
Reviewed-on: http://gerrit.openafs.org/9146
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
for(i=0; i<nkeys; i++) {
key = afsconf_typedKey_blank();
+ if (key == NULL)
+ goto fail;
key->type = afsconf_rxkad;
key->subType = 0;
afs_int32 reclen;
key = afsconf_typedKey_blank();
+ if (key == NULL)
+ goto fail;
/* The only data version we currently parse has a reclen of 16.
* Anything smaller indicates a corrupt key file. Anything more,