Re: [PATCH 23/27] NFS: Fix memory leak [try #2]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2008-01-23 at 17:22 +0000, David Howells wrote:
> Fix a memory leak whereby multiple clientaddr=xxx mount options just overwrite
> the duplicated client_address option pointer, without freeing the old memory.
> 
> Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
> ---
> 
>  fs/nfs/super.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> 
> diff --git a/fs/nfs/super.c b/fs/nfs/super.c
> index 0b0c72a..7f5e747 100644
> --- a/fs/nfs/super.c
> +++ b/fs/nfs/super.c
> @@ -936,6 +936,7 @@ static int nfs_parse_mount_options(char *raw,
>  			string = match_strdup(args);
>  			if (string == NULL)
>  				goto out_nomem;
> +			kfree(mnt->client_address);
>  			mnt->client_address = string;
>  			break;
>  		case Opt_mountaddr:

Thanks. This fix has already been applied to the NFS git tree.
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux