- Fix bug#637: fix that nsd.db grows limitlessly, an off by one
on one megabyte free chunks, created during AXFRs of large zones,
that caused the one megabyte chunk to be leaked.
ok sthen@
return ret + sizeof(udb_chunk_d); /* ptr to data */
}
/* see if we can subdivide a larger chunk */
- for(e2 = exp+1; e2 < UDB_ALLOC_CHUNKS_MAX; e2++)
+ for(e2 = exp+1; e2 <= UDB_ALLOC_CHUNKS_MAX; e2++)
if(alloc->disk->free[e2-UDB_ALLOC_CHUNK_MINEXP]) {
udb_void big, ret; /* udb_chunk_d */
alloc->udb->glob_data->dirty_alloc = udb_dirty_fl;
int e2;
if(alloc->disk->free[exp-UDB_ALLOC_CHUNK_MINEXP])
return exp;
- for(e2 = exp+1; e2 < UDB_ALLOC_CHUNKS_MAX; e2++)
+ for(e2 = exp+1; e2 <= UDB_ALLOC_CHUNKS_MAX; e2++)
if(alloc->disk->free[e2-UDB_ALLOC_CHUNK_MINEXP]) {
return e2;
}