Free the table at the end in ovnitop

This commit is contained in:
Rodrigo Arias 2023-06-01 18:38:26 +02:00
parent c1b0768e7d
commit d9b82494d0

View File

@ -61,6 +61,12 @@ report(void)
for (struct entry *e = table; e; e = e->hh.next) for (struct entry *e = table; e; e = e->hh.next)
printf("%s %10ld\n", e->mcv, e->count); printf("%s %10ld\n", e->mcv, e->count);
struct entry *e, *tmp;
HASH_ITER(hh, table, e, tmp) {
HASH_DEL(table, e);
free(e);
}
} }
static void static void