From: Trond Myklebust Subject: Re: [PATCH 23/27] NFS: Fix memory leak [try #2] Date: Thu, 24 Jan 2008 16:15:29 -0500 Message-ID: <1201209329.7054.41.camel@heimdal.trondhjem.org> References: <20080123172038.11107.86025.stgit@warthog.procyon.org.uk> <20080123172241.11107.75955.stgit@warthog.procyon.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, linux-security-module@vger.kernel.org, nfsv4@linux-nfs.org, linux-kernel@vger.kernel.org, selinux@tycho.nsa.gov To: David Howells Return-path: In-Reply-To: <20080123172241.11107.75955.stgit@warthog.procyon.org.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: nfsv4-bounces@linux-nfs.org Errors-To: nfsv4-bounces@linux-nfs.org List-Id: linux-fsdevel.vger.kernel.org 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 > --- > > 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.