memory leak: test_group_readwrite leaks an attrib

- groups were not clearing attribs when they were destroyed.
- new critbit module fixes leak in cb_erase
This commit is contained in:
Enno Rehling 2016-03-10 22:30:19 +01:00
parent 1920dde717
commit c9e524d161
2 changed files with 4 additions and 1 deletions

@ -1 +1 @@
Subproject commit 934c2dd94d41da19637a76a1a8b3dfeb7aa8524d Subproject commit ee7a32b9b8986bf2ea6b287975f9ef0ec997b7a3

View File

@ -132,6 +132,9 @@ void free_group(group * g)
assert(*g_ptr == g); assert(*g_ptr == g);
*g_ptr = g->nexthash; *g_ptr = g->nexthash;
if (g->attribs) {
a_removeall(&g->attribs, NULL);
}
while (g->allies) { while (g->allies) {
ally *a = g->allies; ally *a = g->allies;
g->allies = a->next; g->allies = a->next;