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>
maint
Ævar Arnfjörð Bjarmason7 years agocommitted byJunio C Hamano
@ -242,8 +242,7 @@ static int disconnect_helper(struct transport *transport)
@@ -242,8 +242,7 @@ static int disconnect_helper(struct transport *transport)
close(data->helper->out);
fclose(data->out);
res = finish_command(data->helper);
free(data->helper);
data->helper = NULL;
FREE_AND_NULL(data->helper);
}
return res;
}
@ -711,43 +710,35 @@ static int push_update_ref_status(struct strbuf *buf,
@@ -711,43 +710,35 @@ static int push_update_ref_status(struct strbuf *buf,
@ -226,8 +226,7 @@ int parse_tree_gently(struct tree *item, int quiet_on_missing)
@@ -226,8 +226,7 @@ int parse_tree_gently(struct tree *item, int quiet_on_missing)