NFS: Fix sysfs server name memory leak
authorBenjamin Coddington <bcodding@redhat.com>
Mon, 10 Jul 2023 18:41:58 +0000 (14:41 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 19 Aug 2023 14:26:29 +0000 (10:26 -0400)
commitc3dd7de2a3137d84161dcfb522c19f8b2884e502
tree4a11ccf24c013e5c9c2f2f26f04cd5bd3bcc34e0
parentbe2fd1560eb57b7298aa3c258ddcca0d53ecdea3
NFS: Fix sysfs server name memory leak

Free the formatted server index string after it has been duplicated by
kobject_rename().

Fixes: 1c7251187dc0 ("NFS: add superblock sysfs entries")
Reported-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/sysfs.c