]> git.michaelhowe.org Git - packages/o/openafs.git/commit
afs: Make afs_osi_Free(NULL) a no-op
authorAndrew Deason <adeason@sinenomine.net>
Fri, 29 Jun 2018 20:25:48 +0000 (15:25 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 27 Jul 2018 13:26:24 +0000 (09:26 -0400)
commit4b42b490fc1c2223a465981a59914b37773ad84a
treea00d3481f220896f359067449aa44d0045b3ccee
parent6fed86775ba9ac7edc9444986c75a60771927411
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.

Reviewed-on: https://gerrit.openafs.org/13236
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 7523397333c0f8c6a08312434968d84b8ff56306)

Change-Id: Ifda1bd8c99f128fe01d38fd64dc19afee4c5158f
Reviewed-on: https://gerrit.openafs.org/13250
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/afs/afs_osi_alloc.c