From 13acb6fbefd6c4f4af951270ca07a1a5541052fa Mon Sep 17 00:00:00 2001 From: Andrew Deason Date: Sun, 21 Jul 2019 19:21:44 -0500 Subject: [PATCH] afs: Free afs_thiscell during shutdown Currently, afs_thiscell can be allocated (via strdup) during client startup, but is never freed. Free it in shutdown_cell() to avoid leaking the memory. Change-Id: I77954ef35f949c8a638ba15615148ab784f7f48f Reviewed-on: https://gerrit.openafs.org/13714 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot --- src/afs/afs_cell.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/afs/afs_cell.c b/src/afs/afs_cell.c index 10c04f6afb..29cf64fc10 100644 --- a/src/afs/afs_cell.c +++ b/src/afs/afs_cell.c @@ -1119,6 +1119,10 @@ shutdown_cell(void) cn = next; } } + if (afs_thiscell) { + afs_osi_FreeStr(afs_thiscell); + afs_thiscell = NULL; + } } /*!