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
@ -667,11 +667,9 @@ void diffcore_rename(struct diff_options *options)
|
||||
for (i = 0; i < rename_dst_nr; i++)
|
||||
free_filespec(rename_dst[i].two);
|
||||
|
||||
free(rename_dst);
|
||||
rename_dst = NULL;
|
||||
FREE_AND_NULL(rename_dst);
|
||||
rename_dst_nr = rename_dst_alloc = 0;
|
||||
free(rename_src);
|
||||
rename_src = NULL;
|
||||
FREE_AND_NULL(rename_src);
|
||||
rename_src_nr = rename_src_alloc = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user