bugfixed: free task point correctly in free_queue_destroy
parent
e32e6315b5
commit
09bc970dab
3
HISTORY
3
HISTORY
|
|
@ -1,6 +1,7 @@
|
|||
Version 1.25 2016-02-19
|
||||
Version 1.25 2016-02-22
|
||||
* php7_ext_wrapper.h add more macro defines
|
||||
* compile passed in FreeBSD 10.2
|
||||
* bugfixed: free task point correctly in free_queue_destroy
|
||||
|
||||
Version 1.24 2016-02-15
|
||||
* php extension compiled on PHP 7
|
||||
|
|
|
|||
|
|
@ -313,17 +313,21 @@ void free_queue_destroy()
|
|||
char *pCharEnd;
|
||||
struct fast_task_info *pTask;
|
||||
|
||||
pCharEnd = ((char *)g_mpool.head->blocks) + g_free_queue.block_size *
|
||||
g_free_queue.alloc_connections;
|
||||
for (p=(char *)g_mpool.head->blocks; p<pCharEnd; p += g_free_queue.block_size)
|
||||
{
|
||||
pTask = (struct fast_task_info *)p;
|
||||
if (pTask->data != NULL)
|
||||
{
|
||||
free(pTask->data);
|
||||
pTask->data = NULL;
|
||||
}
|
||||
}
|
||||
mpool = g_mpool.head;
|
||||
while (mpool != NULL)
|
||||
{
|
||||
pCharEnd = (char *)mpool->last_block + g_free_queue.block_size;
|
||||
for (p=(char *)mpool->blocks; p<pCharEnd; p += g_free_queue.block_size)
|
||||
{
|
||||
pTask = (struct fast_task_info *)p;
|
||||
if (pTask->data != NULL)
|
||||
{
|
||||
free(pTask->data);
|
||||
pTask->data = NULL;
|
||||
}
|
||||
}
|
||||
mpool = mpool->next;
|
||||
}
|
||||
}
|
||||
|
||||
mpool = g_mpool.head;
|
||||
|
|
|
|||
Loading…
Reference in New Issue