afs: Actually free resources during warm shutdown 16/13716/3
authorAndrew Deason <adeason@dson.org>
Sun, 21 Jul 2019 22:02:34 +0000 (17:02 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 30 Aug 2019 15:03:12 +0000 (11:03 -0400)
commit2336164d1bf63980419d3a870f908f1f384fdfc0
tree6b949e91f529611c0ea221b9ba777f37f594051d
parent130a92214cc0b9a8f4ea24a3dcd3ed04575e3c4e
afs: Actually free resources during warm shutdown

Currently, the shutdown_*() code paths for several subsystems only
free the memory for that subsystem for "cold" shutdowns, and not for
"warm" shutdowns. This means the memory gets leaked during a "warm"
shutdown, since we never free these resources anywhere else.
Specifically, this happens in shutdown_bufferpackage, shutdown_AFS,
and shutdown_osinet.

To avoid these leaks for warm shutdowns, just move the
afs_cold_shutdown check around a little, so we free the relevant items
in either codepath.

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