crctk.c: introduce free_if_flagged()