From 6a83d902073803c4141e02c53decf8c03e35da27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Thu, 15 Jun 2017 23:15:46 +0000 Subject: coccinelle: make use of the "type" FREE_AND_NULL() rule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Junio C Hamano --- object.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'object.c') diff --git a/object.c b/object.c index 06ba3a11d8..f818777412 100644 --- a/object.c +++ b/object.c @@ -377,8 +377,7 @@ void object_array_clear(struct object_array *array) int i; for (i = 0; i < array->nr; i++) object_array_release_entry(&array->objects[i]); - free(array->objects); - array->objects = NULL; + FREE_AND_NULL(array->objects); array->nr = array->alloc = 0; } -- cgit v1.2.3