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
@ -837,8 +837,7 @@ static void interactive_main_loop(void)
|
||||
int ret;
|
||||
ret = menus[*chosen].fn();
|
||||
if (ret != MENU_RETURN_NO_LOOP) {
|
||||
free(chosen);
|
||||
chosen = NULL;
|
||||
FREE_AND_NULL(chosen);
|
||||
if (!del_list.nr) {
|
||||
clean_print_color(CLEAN_COLOR_ERROR);
|
||||
printf_ln(_("No more files to clean, exiting."));
|
||||
@ -851,8 +850,7 @@ static void interactive_main_loop(void)
|
||||
quit_cmd();
|
||||
}
|
||||
|
||||
free(chosen);
|
||||
chosen = NULL;
|
||||
FREE_AND_NULL(chosen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user