On Tue,  8 May 2018 12:37:36 -0700
Stefan Beller <[email protected]> wrote:

> +void clear_alloc_state(struct alloc_state *s)
> +{
> +     while (s->slab_nr > 0) {
> +             s->slab_nr--;
> +             free(s->slabs[s->slab_nr]);
> +     }

I should have caught this earlier, but you need to free s->slabs itself
too.

> +void release_tree_node(struct tree *t);
> +void release_commit_node(struct commit *c);
> +void release_tag_node(struct tag *t);

Do these really need to be defined in alloc.c? I would think that it
would be sufficient to define them as static in object.c.

Having said that, opinions differ (e.g. Duy said he thinks that release_
goes with alloc_ [1]) so I'm OK either way.

[1] 
https://public-inbox.org/git/cacsjy8d-e-bff3s+lqamfwb-w8opkjrffrv9o5s3ku+m5aa...@mail.gmail.com/

Reply via email to