public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Thomas Rast <trast@inf•ethz.ch>
To: Stefan Beller <stefanbeller@googlemail•com>
Cc: <git@vger•kernel.org>, <peff@peff•net>, <gitster@pobox•com>
Subject: Re: [PATCH] mailmap: fix check for freeing memory
Date: Tue, 20 Aug 2013 15:40:02 +0200	[thread overview]
Message-ID: <878uzw7a6l.fsf@linux-k42r.v.cablecom.net> (raw)
In-Reply-To: <1377004958-14489-1-git-send-email-stefanbeller@googlemail.com> (Stefan Beller's message of "Tue, 20 Aug 2013 15:22:38 +0200")

Stefan Beller <stefanbeller@googlemail•com> writes:

> The condition as it is written in that line was most likely intended to
> check for the pointer passed to free(), rather than checking for the
> 'repo_abbrev', which is already checked against being non null at the
> beginning of the function.
[...]
> -			if (repo_abbrev)
> +			if (*repo_abbrev)
>  				free(*repo_abbrev);

But now the test is useless, because free(NULL) is defined to be a
no-op.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

  reply	other threads:[~2013-08-20 13:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-20 13:22 [PATCH] mailmap: fix check for freeing memory Stefan Beller
2013-08-20 13:40 ` Thomas Rast [this message]
2013-08-20 13:52   ` Jeff King
2013-08-20 14:17   ` Stefan Beller
2013-08-20 14:18     ` [PATCH] mailmap: remove redundant " Stefan Beller
2013-08-20 14:28       ` Jeff King
2013-08-20 14:23     ` [PATCH] mailmap: fix " Thomas Rast
2013-08-20 14:38       ` Stefan Beller
2013-08-20 16:12         ` Jeff King
2013-08-20 17:18           ` Junio C Hamano
2013-08-20 17:45             ` Jeff King
2013-08-20 14:27     ` Jeff King

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=878uzw7a6l.fsf@linux-k42r.v.cablecom.net \
    --to=trast@inf$(echo .)ethz.ch \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=peff@peff$(echo .)net \
    --cc=stefanbeller@googlemail$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox