libafs: don't free the NULL we get from a failed allocation
authorGarrett Wollman <wollman@csail.mit.edu>
Sat, 13 Aug 2011 23:12:50 +0000 (19:12 -0400)
committerDerrick Brashear <shadow@dementix.org>
Sun, 14 Aug 2011 02:07:21 +0000 (19:07 -0700)
commitee56107d4d168ef07968afeaa7f1c5b39f5c5b23
tree79f471524fabe133cb4e0d56c8c95ad7cd86b6d2
parent5b40c5f5294964fc09df2c8332ab63cd2d729264
libafs: don't free the NULL we get from a failed allocation

In extractPioctlToken(), if we fail to allocate space for
token_opaque_val, don't immediately pass the null pointer
to osi_Free on the error exit path.

Change-Id: Ic95e178cfbc1b1bbcb18701c0bbd5221426342ee
Found-by: clang static analyzer with help from AFS_NONNULL
Reviewed-on: http://gerrit.openafs.org/5262
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/afs/afs_tokens.c