summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Beller <stefanbeller@googlemail.com>2013-08-20 14:18:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-08-20 17:10:37 (GMT)
commitc9ba31f592ccf23dc2aa78a705a790341ea72cfd (patch)
tree553e1640e145c26cc1e0a74ca4dc5e8d06487a8c
parent4d06473928ee574910accbde05c19ef2263abdf6 (diff)
downloadgit-c9ba31f592ccf23dc2aa78a705a790341ea72cfd.zip
git-c9ba31f592ccf23dc2aa78a705a790341ea72cfd.tar.gz
git-c9ba31f592ccf23dc2aa78a705a790341ea72cfd.tar.bz2
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>
-rw-r--r--mailmap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mailmap.c b/mailmap.c
index 44614fc..7d5caa6 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++)