All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marek Lindner <lindner_marek@yahoo.de>
To: The list for a Better Approach To Mobile Ad-hoc Networking
	<b.a.t.m.a.n@lists.open-mesh.org>
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)
Date: Thu, 4 Mar 2010 23:35:09 +0800	[thread overview]
Message-ID: <201003042335.09788.lindner_marek@yahoo.de> (raw)
In-Reply-To: <201003042309.05473.lindner_marek@yahoo.de>

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

      reply	other threads:[~2010-03-04 15:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-04 13:50 [B.A.T.M.A.N.] [PATCH v2] batctl: avoid parsing bat-hosts multiple times Daniel Seither
2010-03-04 15:09 ` Marek Lindner
2010-03-04 15:35   ` Marek Lindner [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201003042335.09788.lindner_marek@yahoo.de \
    --to=lindner_marek@yahoo.de \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.