Free event list names on clear_events()

clear_events() just reset the start point of our event list, but didn't
actually free the event names that got "cleared".

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2014-12-18 08:47:56 +01:00 committed by Dirk Hohndel
parent 964beb2621
commit b2199a9687

View file

@ -120,6 +120,8 @@ int evn_foreach (void (*callback)(const char *, bool *, void *), void *data) {
void clear_events(void)
{
for (int i = 0; i < evn_used; i++)
free(ev_namelist[i].ev_name);
evn_used = 0;
}