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:49:08 +0000 (17:49 +0200)
commite3cd274437353f723b2b8e87f603fb9ca0942bc4
tree135bda00e82fec493fad545bffc226ac9a755a81
parent2f7b5e7673926493bb95efbeed93d5dc0e10b5b8
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