From owner-freebsd-current Sun Oct 20 14: 0:52 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8FD7037B404; Sun, 20 Oct 2002 14:00:51 -0700 (PDT) Received: from flamingo.mail.pas.earthlink.net (flamingo.mail.pas.earthlink.net [207.217.120.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id BFDE843EA3; Sun, 20 Oct 2002 14:00:46 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0230.cvx22-bradley.dialup.earthlink.net ([209.179.198.230] helo=mindspring.com) by flamingo.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 183NBW-0007bn-00; Sun, 20 Oct 2002 14:00:30 -0700 Message-ID: <3DB31925.7B70E70@mindspring.com> Date: Sun, 20 Oct 2002 13:59:17 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: "M. Warner Losh" Cc: jake@locore.ca, ben@stuyts.nl, current@FreeBSD.ORG, jroberson@chesapeake.net, rwatson@FreeBSD.ORG, jeff@FreeBSD.ORG, alfred@FreeBSD.ORG Subject: Re: [Ugly PATCH] Again: panic kmem_malloc() References: <3DB07805.AB4BAA15@mindspring.com> <4.3.2.7.2.20021019001010.00b89f28@terminus> <20021018213608.A60569@locore.ca> <20021020.125308.35255652.imp@bsdimp.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG "M. Warner Losh" wrote: > : + if (sops) > : + free(sops, M_SEM); > > The kernel free() groks free(NULL, M_FOO), so the if isn't needed. Wow. That's bogus. It should panic. Or we should fix all of libc to take NULL arguments for strings, and treat them as if they were actually "". -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message