From c9ba31f592ccf23dc2aa78a705a790341ea72cfd Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Tue, 20 Aug 2013 16:18:00 +0200 Subject: [PATCH] mailmap: remove redundant check for freeing memory 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 Signed-off-by: Junio C Hamano --- mailmap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mailmap.c b/mailmap.c index 44614fc411..7d5caa65f3 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++)