The previous fix was insufficient as we also have to destroy the
score table in the success case, so move the freeing to destroy_mood().
Fixes: bb0aec0963b1b2da617aebda26deca576684436c
if (!m)
return;
mp_shutdown(m->parser_context);
+ if (m->score_table)
+ score_close(m->score_table);
free(m->name);
free(m);
}
}
out:
free(aa.array);
- if (ret < 0) {
- if (aa.m->score_table)
- score_close(aa.m->score_table);
+ if (ret < 0)
destroy_mood(aa.m);
- }
return ret;
}