Skip to content

Commit

Permalink
xfs: use kmem_free to free return value of kmem_zalloc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pan Bian authored and Darrick J. Wong committed Sep 3, 2017
1 parent 8353a81 commit 6c37059
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xfs/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,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;
}
Expand Down

0 comments on commit 6c37059

Please sign in to comment.