From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Marek Lindner Date: Thu, 4 Mar 2010 23:35:09 +0800 References: <4B8FBAAA.7060406@tiwoc.de> <201003042309.05473.lindner_marek@yahoo.de> In-Reply-To: <201003042309.05473.lindner_marek@yahoo.de> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201003042335.09788.lindner_marek@yahoo.de> Subject: Re: [B.A.T.M.A.N.] no need to check for NULL before calling free() (was: [PATCH v2] batctl: avoid parsing bat-hosts multiple times) Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: The list for a Better Approach To Mobile Ad-hoc Networking On Thursday 04 March 2010 23:09:05 Marek Lindner wrote: > I added a small check add the end of the patch to make sure that we don't > attempt to free a NULL pointer. Sven just informed me that this is not necessary - free() also accepts a NULL pointer. Shockingly I was not aware of that. It seems I'm not the only one since even manpages do it wrong (e.g. man 3 getline). :-) Cheers, Marek