Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Tue, 11 Mar 2003 16:56:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Tue, 11 Mar 2003 16:56:26 -0500 Received: from tone.orchestra.cse.unsw.EDU.AU ([129.94.242.28]:53987 "HELO tone.orchestra.cse.unsw.EDU.AU") by vger.kernel.org with SMTP id ; Tue, 11 Mar 2003 16:56:25 -0500 From: Neil Brown To: Oleg Drokin Date: Wed, 12 Mar 2003 09:06:44 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15982.24052.21454.181492@notabene.cse.unsw.edu.au> Cc: linux-kernel@vger.kernel.org Subject: Re: [2.5] nfsd/export.c memleak. In-Reply-To: message from Oleg Drokin on Tuesday March 11 References: <20030311175848.A3142@namesys.com> X-Mailer: VM 7.08 under Emacs 20.7.2 X-face: [Gw_3E*Gng}4rRrKRYotwlE?.2|**#s9D Hello! > > There is trivial memleak on error exit path in nfsd. > See the patch below. > Found with help of smatch + enhanced unfree script. Thanks to all threee of you? However in keeping with the style of surrounding code I will make it: ===== fs/nfsd/export.c 1.71 vs edited ===== --- 1.71/fs/nfsd/export.c Tue Feb 25 13:08:50 2003 +++ edited/fs/nfsd/export.c Tue Mar 11 17:55:18 2003 @@ -294,7 +294,10 @@ /* client */ len = qword_get(&mesg, buf, PAGE_SIZE); - if (len <= 0) return -EINVAL; + err = -EINVAL; + if (len <= 0) + goto out; + err = -ENOENT; dom = auth_domain_find(buf); if (!dom) NeilBrown - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/