Commit e8b8139c authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Recurse to clean the content of all cells

parent 62d46d9f
......@@ -711,4 +711,11 @@ void cell_clean_links(struct cell *c, void *data) {
/**
* @brief Frees up the memory allocated for this #cell
*/
void cell_clean(struct cell *c) { free(c->sort); }
void cell_clean(struct cell *c) {
free(c->sort);
/* Recurse */
for (int k = 0; k < 8; k++)
if (c->progeny[k]) cell_clean(c->progeny[k]);
}
......@@ -3178,8 +3178,8 @@ void engine_init(struct engine *e, struct space *s,
#if defined(HAVE_SETAFFINITY)
if (with_aff) {
free(cpuid);
free(buf);
}
free(buf);
#endif
/* Wait for the runner threads to be in place. */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment