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
@ -483,8 +483,7 @@ static int run_applypatch_msg_hook(struct am_state *state)
|
||||
ret = run_hook_le(NULL, "applypatch-msg", am_path(state, "final-commit"), NULL);
|
||||
|
||||
if (!ret) {
|
||||
free(state->msg);
|
||||
state->msg = NULL;
|
||||
FREE_AND_NULL(state->msg);
|
||||
if (read_commit_msg(state) < 0)
|
||||
die(_("'%s' was deleted by the applypatch-msg hook"),
|
||||
am_path(state, "final-commit"));
|
||||
|
Reference in New Issue
Block a user