summaryrefslogtreecommitdiff
path: root/line-log.c
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2017-06-15 23:15:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-06-16 19:44:03 (GMT)
commit6a83d902073803c4141e02c53decf8c03e35da27 (patch)
tree209cf1639a325875240fce3e1f1cabbdb25878df /line-log.c
parentcf9f49ea4817b36e93e64909a918a912cc32c28b (diff)
downloadgit-6a83d902073803c4141e02c53decf8c03e35da27.zip
git-6a83d902073803c4141e02c53decf8c03e35da27.tar.gz
git-6a83d902073803c4141e02c53decf8c03e35da27.tar.bz2
coccinelle: make use of the "type" FREE_AND_NULL() rule
Apply the result of the just-added coccinelle rule. This manually excludes a few occurrences, mostly things that resulted in many FREE_AND_NULL() on one line, that'll be manually fixed in a subsequent change. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'line-log.c')
-rw-r--r--line-log.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/line-log.c b/line-log.c
index b908781..79eded7 100644
--- a/line-log.c
+++ b/line-log.c
@@ -610,8 +610,7 @@ parse_lines(struct commit *commit, const char *prefix, struct string_list *args)
line_log_data_insert(&ranges, full_name, begin, end);
free_filespec(spec);
- free(ends);
- ends = NULL;
+ FREE_AND_NULL(ends);
}
for (p = ranges; p; p = p->next)