bug fixed: NOT set last_block->next when realloc
parent
c0778f54fb
commit
23a12c1bef
|
|
@ -265,7 +265,7 @@ int free_queue_init_ex(const int max_connections, const int init_connections,
|
|||
else
|
||||
{
|
||||
g_mpool.tail->next = mpool;
|
||||
g_mpool.tail->last_block->next = mpool->blocks;
|
||||
g_mpool.tail->last_block->next = mpool->blocks; //link previous mpool to current
|
||||
}
|
||||
g_mpool.tail = mpool;
|
||||
|
||||
|
|
@ -370,14 +370,10 @@ static int free_queue_realloc()
|
|||
else
|
||||
{
|
||||
g_mpool.tail->next = mpool;
|
||||
g_mpool.tail->last_block->next = mpool->blocks;
|
||||
}
|
||||
g_mpool.tail = mpool;
|
||||
|
||||
if (head == NULL)
|
||||
{
|
||||
head = mpool->blocks;
|
||||
}
|
||||
tail = mpool->last_block;
|
||||
|
||||
remain_count -= alloc_count;
|
||||
|
|
|
|||
Loading…
Reference in New Issue