implementing non-recursive tralloc_free