aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/cifsd/vfs_cache.c
diff options
context:
space:
mode:
authorMuhammad Usama Anjum <musamaanjum@gmail.com>2021-04-02 09:25:35 +0900
committerSteve French <stfrench@microsoft.com>2021-05-10 19:15:36 -0500
commit822bc8ea514ecd4a8bbb86237858146ca8845eba (patch)
tree3ab2f6384efbefee566b560eec727803c3459ce3 /fs/cifsd/vfs_cache.c
parentcifsd: fix memory leak when loop ends (diff)
downloadwireguard-linux-822bc8ea514ecd4a8bbb86237858146ca8845eba.tar.xz
wireguard-linux-822bc8ea514ecd4a8bbb86237858146ca8845eba.zip
cifsd: use kfree to free memory allocated by kmalloc or kzalloc
kfree should be used to free memory allocated by kmalloc or kzalloc to avoid any overhead and for maintaining consistency. Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to '')
-rw-r--r--fs/cifsd/vfs_cache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifsd/vfs_cache.c b/fs/cifsd/vfs_cache.c
index ec631dc6f1fb..f2a863542dc7 100644
--- a/fs/cifsd/vfs_cache.c
+++ b/fs/cifsd/vfs_cache.c
@@ -829,6 +829,6 @@ void ksmbd_destroy_file_table(struct ksmbd_file_table *ft)
__close_file_table_ids(ft, NULL, session_fd_check);
idr_destroy(ft->idr);
- ksmbd_free(ft->idr);
+ kfree(ft->idr);
ft->idr = NULL;
}