auth: Handle empty lists of keys
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 31 Mar 2012 18:33:33 +0000 (14:33 -0400)
committerDerrick Brashear <shadow@dementix.org>
Mon, 9 Apr 2012 01:20:38 +0000 (18:20 -0700)
commit54ca22a905c65e0544ce17c74fd59073f46b8c9f
tree8b36457d5652e5cdb12282b22915b232cbbdf410
parent5815c5ffb03e8afa0d36eef7da865e564d568296
auth: Handle empty lists of keys

Handle the case where a list of keys may be empty - don't attempt
to calloc a 0 length array, and have Put handle the case where the
array being freed has no elements.

Caught by clang-analyzer

Change-Id: I665035cb00a8da411710a71a17ae66545702127f
Reviewed-on: http://gerrit.openafs.org/7098
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/auth/keys.c