Re: [PATCH] shallow.c: Don't free unallocated slabs
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> ... This is really an internal implementation
> detail of how the slab code works. It would be nice if callers didn't
> have to care about it. Perhaps we ought to have a slab foreach()
> function that encapsulates this, which would let this caller do
> something like:
>
> commit_depth_foreach(&depths, free_commit_depth);
> commit_depth_clear(&depths);
>
> But since this is the only place that looks into the slab in this way,
> I'm happy to take your much simpler fix in the meantime.