]> git.michaelhowe.org Git - packages/o/openafs.git/commit
afs: Free 'addrs' array
authorAndrew Deason <adeason@sinenomine.net>
Mon, 1 Oct 2018 15:56:53 +0000 (11:56 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Sun, 26 Jan 2020 18:32:37 +0000 (13:32 -0500)
commit62ec1c913134f515802140e48e6386ec35559767
tree57339e369421245e63eb8c980e0c3e3d49e70847
parentdace4163c169f879c4054e1f3e9071b8b0ab3226
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.

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

Change-Id: I5d64899c7be40ba3e1b0985c4829933eebbd8323
Reviewed-on: https://gerrit.openafs.org/13899
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/afs_pioctl.c
src/afs/afs_server.c