afs: Make afs_osi_Free(NULL) a no-op 36/13236/2
authorAndrew Deason <adeason@sinenomine.net>
Fri, 29 Jun 2018 20:25:48 +0000 (15:25 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 6 Jul 2018 03:37:22 +0000 (23:37 -0400)
commit7523397333c0f8c6a08312434968d84b8ff56306
treecf028bad8374f56fc5ef67a79faf1c42b54b6eb6
parente60766286b7a581dcdd14466884ea7fdcae10918
afs: Make afs_osi_Free(NULL) a no-op

In userspace, we assume that free(NULL) does nothing, which makes
certain cleanup code paths simpler. This may or may not be true for
our free() abstractions that can run in the kernel (like afs_osi_Free,
rxi_Free, etc), which is confusing. To make the higher-level free()
abstractions more consistent, change afs_osi_Free to guarantee that
passing a NULL pointer does nothing.

Change-Id: If7c7011795f66464eeb578eacfc943475b4d59f8
Reviewed-on: https://gerrit.openafs.org/13236
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/afs/afs_osi_alloc.c