auth: Make afsconf_PutTypedKeyList idempotent 07/13507/4
authorAndrew Deason <adeason@sinenomine.net>
Sat, 2 Feb 2019 05:25:02 +0000 (23:25 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Sat, 23 Mar 2019 22:43:57 +0000 (18:43 -0400)
commitde883869d7ac2af6a640f8cf9f3d8c7c37433ce5
tree8b68749876cc3e3ac8c862cb7fbc9b15bac2cbbd
parent635594d6cceba6de4e09be5a9e9b908f7d16697d
auth: Make afsconf_PutTypedKeyList idempotent

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>
src/auth/keys.c