lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 8 Aug 2017 09:35:30 -0700
From:   "Darrick J. Wong" <darrick.wong@...cle.com>
To:     Pan Bian <bianpan2016@....com>
Cc:     linux-xfs@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: xfs: use kmem_free to free return value of kmem_zalloc

On Tue, Aug 08, 2017 at 08:17:57PM +0800, Pan Bian wrote:
> In function xfs_test_remount_options(), kfree() is used to free memory
> allocated by kmem_zalloc(). But it is better to use kmem_free().

Looks fine (for 4.14),
Reviewed-by: Darrick J. Wong <darrick.wong@...cle.com>

> Signed-off-by: Pan Bian <bianpan2016@....com>
> ---
>  fs/xfs/xfs_super.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index 38aaacd..c1c4c2e 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -1220,7 +1220,7 @@ struct proc_xfs_info {
>  	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;
>  }
> -- 
> 1.9.1
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ