trailers: introduce struct new_trailer_item
[gitweb.git] / builtin / clean.c
index ed954134d2dd03242a06eef88bcaec71cc41ffe9..057fc97fe4494338e6a85ac9f695563f1fcb9596 100644 (file)
@@ -838,8 +838,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."));
@@ -852,8 +851,7 @@ static void interactive_main_loop(void)
                        quit_cmd();
                }
 
-               free(chosen);
-               chosen = NULL;
+               FREE_AND_NULL(chosen);
                break;
        }
 }