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>
This commit is contained in:

committed by
Junio C Hamano

parent
cf9f49ea48
commit
6a83d90207
6
attr.c
6
attr.c
@ -638,13 +638,11 @@ void attr_check_reset(struct attr_check *check)
|
||||
|
||||
void attr_check_clear(struct attr_check *check)
|
||||
{
|
||||
free(check->items);
|
||||
check->items = NULL;
|
||||
FREE_AND_NULL(check->items);
|
||||
check->alloc = 0;
|
||||
check->nr = 0;
|
||||
|
||||
free(check->all_attrs);
|
||||
check->all_attrs = NULL;
|
||||
FREE_AND_NULL(check->all_attrs);
|
||||
check->all_attrs_nr = 0;
|
||||
|
||||
drop_attr_stack(&check->stack);
|
||||
|
Reference in New Issue
Block a user