From: Stefan Beller Date: Tue, 20 Aug 2013 14:18:00 GMT Subject: [PATCH] mailmap: remove redundant check for freeing memory Message-ID: <1377008280-17230-1-git-send-email-stefanbeller@googlemail.com> In-Reply-To: <52137A63.3010609@googlemail.com> The condition as it is written in that line has already been checked in the beginning of the function, which was introduced in 8503ee4 (2007-05-01, Fix read_mailmap to handle a caller uninterested in repo abbreviation) Helped-by: Jeff King Helped-by: Thomas Rast Signed-off-by: Stefan Beller --- mailmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mailmap.c b/mailmap.c index 44614fc..7d5caa6 100644 --- a/mailmap.c +++ b/mailmap.c @@ -153,8 +153,7 @@ static void read_mailmap_line(struct string_list *map, char *buffer, if (!strncmp(buffer, abbrev, abblen)) { char *cp; - if (repo_abbrev) - free(*repo_abbrev); + free(*repo_abbrev); *repo_abbrev = xmalloc(len); for (cp = buffer + abblen; isspace(*cp); cp++) -- 1.8.4.rc3.1.gc1ebd90