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
@ -2944,8 +2944,7 @@ static int files_transaction_prepare(struct ref_store *ref_store,
|
||||
head_oid.hash, &head_type);
|
||||
|
||||
if (head_ref && !(head_type & REF_ISSYMREF)) {
|
||||
free(head_ref);
|
||||
head_ref = NULL;
|
||||
FREE_AND_NULL(head_ref);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user