In pool_free_old(), one code path was not clearing a "next" pointer,
authorWayne Davison <wayned@samba.org>
Tue, 21 Aug 2007 05:04:02 +0000 (05:04 +0000)
committerWayne Davison <wayned@samba.org>
Tue, 21 Aug 2007 05:04:02 +0000 (05:04 +0000)
so the code could try to free an extent twice in certain circumstances.

lib/pool_alloc.c

index e1ce50b..0fb3122 100644 (file)
@@ -255,6 +255,7 @@ pool_free_old(alloc_pool_t p, void *addr)
                                cur->free -= skew;
                        }
                        next = cur->next;
+                       cur->next = NULL;
                }
        } else {
                next = cur->next;