Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Sat, 1 Dec 2001 08:05:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Sat, 1 Dec 2001 08:05:37 -0500 Received: from netfinity.realnet.co.sz ([196.28.7.2]:17577 "HELO netfinity.realnet.co.sz") by vger.kernel.org with SMTP id ; Sat, 1 Dec 2001 08:05:25 -0500 Date: Sat, 1 Dec 2001 15:10:08 +0200 (SAST) From: Zwane Mwaikambo X-X-Sender: To: Alan Cox Cc: Linux Kernel Subject: Re: [PATCH] if (foo) kfree(foo) /fs cleanup In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 1 Dec 2001, Alan Cox wrote: > IMHO this is precisely the wrong thing to do. > > We should make the = NULL check within kfree do a BUG() call. That way we > fix the cases not being considered instead of hiding real bugs I agree, but looking at the common case, it would mean lots of extra null checks all over the place. And most people seem used to the idea of free doing nothing when called with a NULL pointer, of course people can always change... Cheers, Zwane Mwaikambo - 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/