All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cifsd: use kfree to free memory allocated by kzalloc
@ 2021-04-01 11:39 Muhammad Usama Anjum
  2021-04-01 11:50 ` Dan Carpenter
  0 siblings, 1 reply; 9+ messages in thread
From: Muhammad Usama Anjum @ 2021-04-01 11:39 UTC (permalink / raw)
  To: Namjae Jeon, Sergey Senozhatsky, Steve French, Hyunchul Lee,
	COMMON INTERNET FILE SYSTEM SERVER,
	COMMON INTERNET FILE SYSTEM SERVER, open list, kernel-janitors,
	colin.king, dan.carpenter,
  Cc: musamaanjum

kfree should be used to free memory allocated by kzalloc to avoid
any overhead and for maintaining consistency.

Fixes: 5dfeb6d945 ("cifsd: use kmalloc() for small allocations")
Signed-off-by: Muhammad Usama Anjum <musamaanjum@gmail.com>
---
This one place was left in earlier patch. I've already received
responsse on that patch. I'm sending a separate patch.

 fs/cifsd/transport_tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/cifsd/transport_tcp.c b/fs/cifsd/transport_tcp.c
index 67163efcf472..040881893417 100644
--- a/fs/cifsd/transport_tcp.c
+++ b/fs/cifsd/transport_tcp.c
@@ -551,7 +551,7 @@ void ksmbd_tcp_destroy(void)
 	list_for_each_entry_safe(iface, tmp, &iface_list, entry) {
 		list_del(&iface->entry);
 		kfree(iface->name);
-		ksmbd_free(iface);
+		kfree(iface);
 	}
 }
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-04-07  0:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 11:39 [PATCH] cifsd: use kfree to free memory allocated by kzalloc Muhammad Usama Anjum
2021-04-01 11:50 ` Dan Carpenter
2021-04-01 12:43   ` [Linux-cifsd-devel] " Namjae Jeon
2021-04-01 12:50     ` Ralph Boehme
2021-04-01 12:59       ` Namjae Jeon
2021-04-01 13:14         ` Ralph Boehme
2021-04-01 13:36           ` Namjae Jeon
2021-04-01 21:04             ` Tom Talpey
2021-04-07  0:17               ` ronnie sahlberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.