[Devel] [PATCH RHEL7 COMMIT] ms/fs: nfs: sysfs: Remove NULL check before kfree
Vasily Averin
vvs at virtuozzo.com
Tue Jan 25 12:38:24 MSK 2022
The commit is pushed to "branch-rh7-3.10.0-1160.53.1.vz7.185.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1160.53.1.vz7.185.2
------>
commit 9fc8e9b61803ccd1f3234929b4db6c6054a7a152
Author: Saurav Girepunje <saurav.girepunje at gmail.com>
Date: Tue Jan 25 12:38:23 2022 +0300
ms/fs: nfs: sysfs: Remove NULL check before kfree
Remove NULL check before kfree, NULL check is taken care
on kfree.
Signed-off-by: Saurav Girepunje <saurav.girepunje at gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust at hammerspace.com>
(cherry-picked from ms commit 0e96322b241cec8e8adf6cea70dc116d614f4add)
https://jira.sw.ru/browse/PSBM-137154
Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>
---
fs/nfs/sysfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/nfs/sysfs.c b/fs/nfs/sysfs.c
index 4f3390b..c489496 100644
--- a/fs/nfs/sysfs.c
+++ b/fs/nfs/sysfs.c
@@ -121,8 +121,7 @@ static void nfs_netns_client_release(struct kobject *kobj)
struct nfs_netns_client,
kobject);
- if (c->identifier)
- kfree(c->identifier);
+ kfree(c->identifier);
kfree(c);
}
More information about the Devel
mailing list