free the process table only after writing it