shutdown_iptpinhole() frees memory

This commit is contained in:
Thomas Bernard 2016-01-19 10:53:14 +01:00
parent 6f8951d40d
commit f1ce2301da
1 changed files with 6 additions and 1 deletions

View File

@ -51,7 +51,12 @@ void init_iptpinhole(void)
void shutdown_iptpinhole(void)
{
/* TODO empty list */
struct pinhole_t * p;
while(pinhole_list.lh_first != NULL) {
p = pinhole_list.lh_first;
LIST_REMOVE(p, entries);
free(p);
}
}
/* return uid */