X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=id_list.c;fp=id_list.c;h=85e8a8824f824590be21aa34c740276f7703e41b;hb=7aa185f7ffbfb86dd631682014d3397c5ca82342;hp=36676d49530b9ac8505aa4e897bcff6202af9f0f;hpb=ab5d8a35c1c111f64137f76939c68365cf4d22fb;p=nbtscanner diff --git a/id_list.c b/id_list.c index 36676d4..85e8a88 100644 --- a/id_list.c +++ b/id_list.c @@ -55,6 +55,16 @@ void id_list_init() } } +void id_list_destroy() +{ + while (head_free_id) { + struct id_list_entry *next = head_free_id->next; + free(head_free_id); + head_free_id = next; + } + num_free_ids = 0; +} + void id_free(struct id_entry *i) { struct id_list_entry *ie = (struct id_list_entry *)malloc(sizeof(struct id_list_entry));