Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1733845 > unrolled thread

[PATCH 4.9 77/78] xfs: use kmem_free to free return value of kmem_zalloc

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2017-09-18 11:20 +0200
Last post2017-09-18 11:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.9 77/78] xfs: use kmem_free to free return value of kmem_zalloc Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-09-18 11:20 +0200

#1733845 — [PATCH 4.9 77/78] xfs: use kmem_free to free return value of kmem_zalloc

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-09-18 11:20 +0200
Subject[PATCH 4.9 77/78] xfs: use kmem_free to free return value of kmem_zalloc
Message-ID<ur0nJ-4ck-141@gated-at.bofh.it>
4.9-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Pan Bian <bianpan2016@163.com>

commit 6c370590cfe0c36bcd62d548148aa65c984540b7 upstream.

In function xfs_test_remount_options(), kfree() is used to free memory
allocated by kmem_zalloc(). But it is better to use kmem_free().

Signed-off-by: Pan Bian <bianpan2016@163.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/xfs/xfs_super.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1214,7 +1214,7 @@ xfs_test_remount_options(
 	tmp_mp->m_super = sb;
 	error = xfs_parseargs(tmp_mp, options);
 	xfs_free_fsname(tmp_mp);
-	kfree(tmp_mp);
+	kmem_free(tmp_mp);
 
 	return error;
 }

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web