On Tue, 8 May 2018 12:37:36 -0700 Stefan Beller <sbeller@xxxxxxxxxx> 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+M5aAjQA@xxxxxxxxxxxxxx/