Skip to content

Commit c9ba31f

Browse files
stefanbellergitster
authored andcommitted
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 <[email protected]> Helped-by: Thomas Rast <[email protected]> Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4d06473 commit c9ba31f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mailmap.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,7 @@ static void read_mailmap_line(struct string_list *map, char *buffer,
153153
if (!strncmp(buffer, abbrev, abblen)) {
154154
char *cp;
155155

156-
if (repo_abbrev)
157-
free(*repo_abbrev);
156+
free(*repo_abbrev);
158157
*repo_abbrev = xmalloc(len);
159158

160159
for (cp = buffer + abblen; isspace(*cp); cp++)

0 commit comments

Comments
 (0)