1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-05 14:06:15 +02:00

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>
This commit is contained in:
Stefan Beller 2013-08-20 16:18:00 +02:00 committed by Junio C Hamano
parent 4d06473928
commit c9ba31f592

View File

@ -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++)