diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2017-06-16 02:15:46 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-16 22:44:03 +0300 |
commit | 6a83d902073803c4141e02c53decf8c03e35da27 (patch) | |
tree | 209cf1639a325875240fce3e1f1cabbdb25878df /ref-filter.c | |
parent | cf9f49ea4817b36e93e64909a918a912cc32c28b (diff) |
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 'ref-filter.c')
-rw-r--r-- | ref-filter.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ref-filter.c b/ref-filter.c index ab32bc9c31..72e6cb8ecc 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -1891,8 +1891,7 @@ void ref_array_clear(struct ref_array *array) for (i = 0; i < array->nr; i++) free_array_item(array->items[i]); - free(array->items); - array->items = NULL; + FREE_AND_NULL(array->items); array->nr = array->alloc = 0; } |