afs: Free 'addrs' array 55/13355/2
authorAndrew Deason <adeason@sinenomine.net>
Mon, 1 Oct 2018 15:56:53 +0000 (11:56 -0400)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 12 Oct 2018 12:46:49 +0000 (08:46 -0400)
commit0548ee436d0f0f92a980d22e03149faedf38dc70
tree594cf5d6eb5ff5e88a1f2e190e49d844da364292
parent2aeabf8c5bca22b400653e2bc88b6f36d47b05ca
afs: Free 'addrs' array

Currently, 3 places in libafs allocate an 'addrs' array in a very
similar way to loop through our list of servers:
ForceAllNewConnections(), afs_LoopServers(), and PCallBackAddr(). Of
these, only afs_LoopServers actually frees the array.
ForceAllNewConnections and PCallBackAddr leak the memory, but these
are only hit from infrequent pioctls that can only be run by root, so
the impact is small.

Fix ForceAllNewConnections and PCallBackAddr to free the array.

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