[PATCH 15/17] Free event list names on clear_events()
Anton Lundin
glance at acc.umu.se
Wed Dec 17 23:47:56 PST 2014
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 at acc.umu.se>
---
profile.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/profile.c b/profile.c
index 521e6f6..6c47545 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;
}
--
2.1.0
More information about the subsurface
mailing list