Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 14 Mar 2003 02:39:49 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 14 Mar 2003 02:39:48 -0500 Received: from angband.namesys.com ([212.16.7.85]:5002 "HELO angband.namesys.com") by vger.kernel.org with SMTP id ; Fri, 14 Mar 2003 02:39:48 -0500 Date: Fri, 14 Mar 2003 10:50:32 +0300 From: Oleg Drokin To: Oleg Drokin , alan@redhat.com, linux-kernel@vger.kernel.org, viro@math.psu.edu Subject: Re: [2.4] init/do_mounts.c::rd_load_image() memleak Message-ID: <20030314105032.A17568@namesys.com> References: <20030313210144.GA3542@linuxhacker.ru> <20030313220308.A28040@flint.arm.linux.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030313220308.A28040@flint.arm.linux.org.uk> User-Agent: Mutt/1.3.22.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 539 Lines: 18 Hello! On Thu, Mar 13, 2003 at 10:03:08PM +0000, Russell King wrote: > > + if (buf) > > + kfree(buf); > kfree(NULL); is valid - you don't need this check. Almost every place I can think of does just this, so I do not see why this particular piece of code should be different. Bye, Oleg - 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/