summaryrefslogtreecommitdiff
path: root/lib/pool_alloc.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2007-06-06 15:43:34 +0000
committerWayne Davison <wayned@samba.org>2007-06-06 15:43:34 +0000
commit8b498b9f1aa9f6419bb633e68a1c21d19c04e381 (patch)
tree1772fd47321f0d9a806a5ebafad90782f945d23c /lib/pool_alloc.c
parentc04af6970114f2209fce571d35ad2b1511119dc8 (diff)
downloadrsync-8b498b9f1aa9f6419bb633e68a1c21d19c04e381.tar.gz
rsync-8b498b9f1aa9f6419bb633e68a1c21d19c04e381.tar.bz2
rsync-8b498b9f1aa9f6419bb633e68a1c21d19c04e381.zip
Decided against the last change.
Diffstat (limited to 'lib/pool_alloc.c')
-rw-r--r--lib/pool_alloc.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/pool_alloc.c b/lib/pool_alloc.c
index 05b182c2..7d95f197 100644
--- a/lib/pool_alloc.c
+++ b/lib/pool_alloc.c
@@ -226,15 +226,9 @@ pool_free_old(alloc_pool_t p, void *addr)
struct alloc_pool *pool = (struct alloc_pool *)p;
struct pool_extent *cur, *prev, *next;
- if (!pool)
+ if (!pool || !addr)
return;
- if (!addr) {
- if (!pool->extents)
- return;
- addr = PTR_ADD(pool->extents->start, pool->extents->free);
- }
-
for (prev = NULL, cur = pool->extents; cur; prev = cur, cur = cur->next) {
if (addr >= cur->start
&& addr < PTR_ADD(cur->start, pool->size))