Currently, if we call afsconf_PutTypedKeyList on a key list, we set
the key list to NULL. But then if we call afsconf_PutTypedKeyList on a
NULL key list, we segfault because we try to dereference the list.
Change afsconf_PutTypedKeyList to be a noop if we give it a NULL list,
avoiding a segfault in such a situation.
Change-Id: I2c1de0c0a05ab036667031eb0e765933917826a6
Reviewed-on: https://gerrit.openafs.org/13507
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
{
int i;
+ if (*keys == NULL) {
+ return;
+ }
+
for (i=0;i<(*keys)->nkeys;i++)
afsconf_typedKey_put(&((*keys)->keys[i]));