mailmap: remove redundant check for freeing memory
authorStefan Beller <stefanbeller@googlemail.com>
Tue, 20 Aug 2013 14:18:00 +0000 (16:18 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 20 Aug 2013 17:10:37 +0000 (10:10 -0700)
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 <peff@peff.net>
Helped-by: Thomas Rast <trast@inf.ethz.ch>
Signed-off-by: Stefan Beller <stefanbeller@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
mailmap.c
index 44614fc411fa7948d710c07a0262454aa0e76d0b..7d5caa65f3810aa62792571663dd12072e082ab9 100644 (file)
--- 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++)