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 <[email protected]>
---
 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

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to