All of lore.kernel.org
 help / color / mirror / Atom feed
From: Muhammad Usama Anjum <musamaanjum@gmail.com>
To: Namjae Jeon <namjae.jeon@samsung.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steve French <sfrench@samba.org>,
	Hyunchul Lee <hyc.lee@gmail.com>,
	open list: COMMON INTERNET FILE SYSTEM SERVER 
	<linux-cifs@vger.kernel.org>,
	COMMON INTERNET FILE SYSTEM SERVER 
	<linux-cifsd-devel@lists.sourceforge.net>,
	open list <linux-kernel@vger.kernel.org>,
	kernel-janitors@vger.kernel.org, colin.king@canonical.com,
	dan.carpenter@oracle.com, ;
Cc: musamaanjum@gmail.com
Subject: [PATCH] cifsd: use kfree to free memory allocated by kzalloc
Date: Thu, 1 Apr 2021 16:39:33 +0500	[thread overview]
Message-ID: <20210401113933.GA2828895@LEGION> (raw)

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


             reply	other threads:[~2021-04-01 18:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-01 11:39 Muhammad Usama Anjum [this message]
2021-04-01 11:50 ` [PATCH] cifsd: use kfree to free memory allocated by kzalloc 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210401113933.GA2828895@LEGION \
    --to=musamaanjum@gmail.com \
    --cc=colin.king@canonical.com \
    --cc=dan.carpenter@oracle.com \
    --cc=hyc.lee@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-cifs@vger.kernel.org \
    --cc=linux-cifsd-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namjae.jeon@samsung.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=sfrench@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.