diff options
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r-- | fs/nfs/inode.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 24d2fbf549bd..6391d8964214 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -1688,8 +1688,7 @@ static void nfs_kill_super(struct super_block *s) | |||
1688 | 1688 | ||
1689 | rpciod_down(); /* release rpciod */ | 1689 | rpciod_down(); /* release rpciod */ |
1690 | 1690 | ||
1691 | if (server->hostname != NULL) | 1691 | kfree(server->hostname); |
1692 | kfree(server->hostname); | ||
1693 | kfree(server); | 1692 | kfree(server); |
1694 | } | 1693 | } |
1695 | 1694 | ||
@@ -1908,8 +1907,7 @@ nfs_copy_user_string(char *dst, struct nfs_string *src, int maxlen) | |||
1908 | return ERR_PTR(-ENOMEM); | 1907 | return ERR_PTR(-ENOMEM); |
1909 | } | 1908 | } |
1910 | if (copy_from_user(dst, src->data, maxlen)) { | 1909 | if (copy_from_user(dst, src->data, maxlen)) { |
1911 | if (p != NULL) | 1910 | kfree(p); |
1912 | kfree(p); | ||
1913 | return ERR_PTR(-EFAULT); | 1911 | return ERR_PTR(-EFAULT); |
1914 | } | 1912 | } |
1915 | dst[maxlen] = '\0'; | 1913 | dst[maxlen] = '\0'; |
@@ -2000,10 +1998,8 @@ static struct super_block *nfs4_get_sb(struct file_system_type *fs_type, | |||
2000 | out_err: | 1998 | out_err: |
2001 | s = (struct super_block *)p; | 1999 | s = (struct super_block *)p; |
2002 | out_free: | 2000 | out_free: |
2003 | if (server->mnt_path) | 2001 | kfree(server->mnt_path); |
2004 | kfree(server->mnt_path); | 2002 | kfree(server->hostname); |
2005 | if (server->hostname) | ||
2006 | kfree(server->hostname); | ||
2007 | kfree(server); | 2003 | kfree(server); |
2008 | return s; | 2004 | return s; |
2009 | } | 2005 | } |
@@ -2023,8 +2019,7 @@ static void nfs4_kill_super(struct super_block *sb) | |||
2023 | 2019 | ||
2024 | destroy_nfsv4_state(server); | 2020 | destroy_nfsv4_state(server); |
2025 | 2021 | ||
2026 | if (server->hostname != NULL) | 2022 | kfree(server->hostname); |
2027 | kfree(server->hostname); | ||
2028 | kfree(server); | 2023 | kfree(server); |
2029 | } | 2024 | } |
2030 | 2025 | ||