Commit 81cb6f1a authored by Pan Bian's avatar Pan Bian Committed by Greg Kroah-Hartman

xfs: use kmem_free to free return value of kmem_zalloc

commit 6c370590 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: default avatarPan Bian <bianpan2016@163.com>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 772003c6
...@@ -1214,7 +1214,7 @@ xfs_test_remount_options( ...@@ -1214,7 +1214,7 @@ xfs_test_remount_options(
tmp_mp->m_super = sb; tmp_mp->m_super = sb;
error = xfs_parseargs(tmp_mp, options); error = xfs_parseargs(tmp_mp, options);
xfs_free_fsname(tmp_mp); xfs_free_fsname(tmp_mp);
kfree(tmp_mp); kmem_free(tmp_mp);
return error; return error;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment