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 <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>
Stefan Beller committed
Aug 20, 2013 at 16:18 UTC
c9ba31f592ccf23dc2aa78a705a790341ea72cfd
1 file changed
+1
-2
mailmap.c
+1
-2
@@ -153,8 +153,7 @@ static void read_mailmap_line(struct string_list *map, char *buffer,
153
if (!strncmp(buffer, abbrev, abblen)) {
154
char *cp;
155
156
- if (repo_abbrev)
157
- free(*repo_abbrev);
156
+ free(*repo_abbrev);
157
*repo_abbrev = xmalloc(len);
158
159
for (cp = buffer + abblen; isspace(*cp); cp++)