afs: Fix memory leak in afs_put_sysnames()
authorZhihao Cheng <chengzhihao1@huawei.com>
Tue, 2 Jun 2020 01:30:45 +0000 (09:30 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:50:42 +0000 (17:50 +0200)
commit445a847a5507b6c98dac5af072fbef40ba1ba73d
tree1642801504542a3c2f4925686e53c387b0f8c12a
parent3b50b29a2056a2e96972a8940bf79aaa03b4dd7f
afs: Fix memory leak in afs_put_sysnames()

[ Upstream commit 2ca068be09bf8e285036603823696140026dcbe7 ]

Fix afs_put_sysnames() to actually free the specified afs_sysnames
object after its reference count has been decreased to zero and
its contents have been released.

Fixes: 6f8880d8e681557 ("afs: Implement @sys substitution handling")
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/afs/proc.c