summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-12-18 08:47:56 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-18 08:34:00 -0800
commitb2199a968783d425bd2f6c9fae3fa22faddb0a5e (patch)
tree5a67b415ce1fd352981185b747d08555328e6238 /profile.c
parent964beb2621fa17a56caa3b34c5c5ef96113ea441 (diff)
downloadsubsurface-b2199a968783d425bd2f6c9fae3fa22faddb0a5e.tar.gz
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>
Diffstat (limited to 'profile.c')
-rw-r--r--profile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/profile.c b/profile.c
index 521e6f68f..6c4754574 100644
--- a/profile.c
+++ b/profile.c
@@ -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;
}