mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
964beb2621
commit
b2199a9687
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue